From 1428e490a49895cf757971dd57db7ae22d3e3988 Mon Sep 17 00:00:00 2001 From: Ahmet Sezgin Duran Date: Wed, 22 Jan 2014 23:45:53 +0200 Subject: [PATCH] Get ready for relase --- README.md | 54 ++++++++++++++++++++++++------ Rakefile | 2 +- lib/medium-editor-rails/engine.rb | 3 -- lib/medium-editor-rails/version.rb | 4 +-- medium-editor-rails.gemspec | 32 +++++++++--------- 5 files changed, 64 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 557442e..d437092 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,58 @@ -# Medium::Editor::Rails +# Medium Editor for Rails -TODO: Write a gem description +This gem integrates [Medium Editor](https://github.com/daviferreira/medium-editor) with Rails asset pipeline. + +## Version + +The latest version of Medium Editor bundled by this gem is [1.5.3](https://github.com/daviferreira/medium-editor/releases) ## Installation -Add this line to your application's Gemfile: +Include **medium-editor-rails** in your Rails project's Gemfile: - gem 'medium-editor-rails' +```ruby +gem 'medium-editor-rails' +``` And then execute: - $ bundle +```bash +$ bundle install +``` + +## Configuration + +Include javascript file in **app/assets/javascripts/application.js**: + +```javascript +//= require medium-edior +``` + +Include stylesheet file on **app/assets/stylesheets/application.css**: + +```scss +*= require medium-editor +``` + +You can also include themes from **themes** folder, example: + +```scss +*= require medium-editor/themes/flat +``` + +## Using Medium Editor with Rails + +You need to initialize Medium Editor with any selector of div, example: -Or install it yourself as: +```html +
- $ gem install medium-editor-rails + +``` -## Usage +For extra options, visit this page: -TODO: Write usage instructions here +https://github.com/daviferreira/medium-editor#initialization-options ## Contributing @@ -26,4 +60,4 @@ TODO: Write usage instructions here 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request +5. Create new Pull Request \ No newline at end of file diff --git a/Rakefile b/Rakefile index 2995527..c702cfc 100644 --- a/Rakefile +++ b/Rakefile @@ -1 +1 @@ -require "bundler/gem_tasks" +require 'bundler/gem_tasks' diff --git a/lib/medium-editor-rails/engine.rb b/lib/medium-editor-rails/engine.rb index a33c204..a2162fb 100644 --- a/lib/medium-editor-rails/engine.rb +++ b/lib/medium-editor-rails/engine.rb @@ -1,9 +1,6 @@ module MediumEditorRails module Rails class Engine < ::Rails::Engine - initializer 'MediumEditorRails precompile hook', :group => :all do |app| - app.config.assets.precompile += %w() - end end end end \ No newline at end of file diff --git a/lib/medium-editor-rails/version.rb b/lib/medium-editor-rails/version.rb index b13a4c5..2b09df2 100644 --- a/lib/medium-editor-rails/version.rb +++ b/lib/medium-editor-rails/version.rb @@ -1,6 +1,6 @@ module MediumEditorRails module Rails - VERSION = "0.0.1" - MEDIUM_EDITOR_VERSION = "" + VERSION = '0.1.0' + MEDIUM_EDITOR_VERSION = '1.5.3' end end diff --git a/medium-editor-rails.gemspec b/medium-editor-rails.gemspec index 6bdf879..3f0cabe 100644 --- a/medium-editor-rails.gemspec +++ b/medium-editor-rails.gemspec @@ -3,21 +3,23 @@ lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'medium-editor-rails/version' -Gem::Specification.new do |spec| - spec.name = "medium-editor-rails" - spec.version = MediumEditorRails::Rails::VERSION - spec.authors = ["Ahmet Sezgin Duran"] - spec.email = ["marjinalist1@gmail.com"] - spec.summary = %q{TODO: Write a short summary. Required.} - spec.description = %q{TODO: Write a longer description. Optional.} - spec.homepage = "" - spec.license = "MIT" +Gem::Specification.new do |s| + s.name = 'medium-editor-rails' + s.version = MediumEditorRails::Rails::VERSION + s.authors = ['Ahmet Sezgin Duran'] + s.email = ['marjinalist1@gmail.com'] + s.summary = %q{Medium Editor integrated in Rails asset pipeline} + s.description = s.summary + s.homepage = 'https://github.com/marjinal1st/medium-editor-rails' + s.license = 'MIT' - spec.files = `git ls-files`.split($/) - spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) - spec.require_paths = ["lib"] + s.files = `git ls-files`.split($/) + s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } + s.test_files = s.files.grep(%r{^(test|spec|features)/}) + s.require_paths = ['lib'] - spec.add_development_dependency "bundler", "~> 1.5" - spec.add_development_dependency "rake" + s.add_dependency 'rails', '> 3.1' + + s.add_development_dependency 'bundler', '~> 1.5' + s.add_development_dependency 'rake' end