marked-rails 0.2.10.0 → 0.2.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d2471985670bca2c17ed2632cddcd9794e43b48
4
- data.tar.gz: 318ebc6d89847852c17f9c8c3fa5f45a813ffb3e
3
+ metadata.gz: b68f070d24786a94504f62f1183c949b4f90d95c
4
+ data.tar.gz: e6797910ccece2cf131e59de8c0dc5d4560d2289
5
5
  SHA512:
6
- metadata.gz: 19979f3886f448b47aa5235165b63f5fd463c9eb9ee37df0eb6eb0fb9a3686803c68d45ca4abeca59395cc206b62176dbebc0e86b87d83572cdf5326b9a2ab13
7
- data.tar.gz: b0bb207fd15400780620d0e0d096e597dc5558f916c680c611817694dbde1704edc16c42e99cfa2e85c09e38994624ea5afa6d502b91a7f67fec1087e5e87dcd
6
+ metadata.gz: 360a9aada83b7dc27baa537274d99c5e8e78de0bf348f37d9dda42f5881eb4428c4d9388bebc4e08fb5de51ff68e4da4c4097070d99b1c03e3b9c5c6311c3ab2
7
+ data.tar.gz: 23d870e6d4ebc2a982d76eae6b98237b8390722cc844ef0140fe12df7ead4b3530f1431b24134b7233440babb35236f66245509bd378065d6c680990cb04f3d6
data/README.md CHANGED
@@ -27,7 +27,16 @@ Or install it yourself as:
27
27
 
28
28
  ## Usage (Without Asset Pipeline)
29
29
 
30
- _Coming ...Eventually_
30
+ This gem adds a generator, `marked:install`. Running the generator will copy Marked to the
31
+ `public/javascripts` directory.
32
+
33
+ To invoke the generator, run:
34
+
35
+ ```sh
36
+ rails generate marked:install
37
+ ```
38
+
39
+ You're done!
31
40
 
32
41
  ## Versioning Conventions
33
42
 
@@ -0,0 +1,34 @@
1
+ require 'rails'
2
+
3
+ # Supply generator for Rails 3.0.x or if asset pipeline is not enabled
4
+ if ::Rails.version < "3.1" || ::Rails.application.config.assets.enabled == false
5
+ module Marked
6
+ module Generators
7
+ class InstallGenerator < ::Rails::Generators::Base
8
+ desc "This generator installs Marked #{Marked::Rails::MARKED_VERSION}"
9
+ source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
10
+
11
+ def copy_marked
12
+ say_status("copying", "Marked (#{Marked::Rails::MARKED_VERSION})", :green)
13
+ copy_file "marked.js", "public/javascripts/marked.js"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ else
19
+ module Marked
20
+ module Generators
21
+ class InstallGenerator < ::Rails::Generators::Base
22
+ desc "Just show instructions so people will know what to do when mistakenly using generator for Rails 3.1 apps with the asset pipeline enabled"
23
+
24
+ def do_nothing
25
+ say_status("deprecated", "You are using Rails >= 3.1 with the asset pipeline enabled, so this generator is not needed.")
26
+ say_status("", "The necessary files are already in your asset pipeline.")
27
+ say_status("", "Just add `//= require marked` to your app/assets/javascripts/application.js")
28
+ say_status("", "If you upgraded your app from Rails < 3.1 and still have marked.js in your javascripts, be sure to remove them.")
29
+ say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -1,5 +1,6 @@
1
1
  module Marked
2
2
  module Rails
3
- VERSION = "0.2.10.0"
3
+ MARKED_VERSION = "0.2.10"
4
+ VERSION = "#{MARKED_VERSION}.1"
4
5
  end
5
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marked-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10.0
4
+ version: 0.2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nodanaonlyzuul
@@ -24,6 +24,7 @@ files:
24
24
  - LICENSE
25
25
  - README.md
26
26
  - Rakefile
27
+ - lib/generators/marked/install/install_generator.rb
27
28
  - lib/marked-rails.rb
28
29
  - lib/marked-rails/engine.rb
29
30
  - lib/marked-rails/version.rb