marked-rails 0.2.10.0 → 0.2.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/lib/generators/marked/install/install_generator.rb +34 -0
- data/lib/marked-rails/version.rb +2 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b68f070d24786a94504f62f1183c949b4f90d95c
|
4
|
+
data.tar.gz: e6797910ccece2cf131e59de8c0dc5d4560d2289
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/marked-rails/version.rb
CHANGED
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.
|
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
|