bootsy 2.0.12 → 2.0.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b37d916855aa7e4327004cdb3c5eb7f11199d256
4
- data.tar.gz: 623f7dc9e67b1e31877b375bbbe6662954f491c5
3
+ metadata.gz: 000c431fdbdf268b93ef584550157a86e614cf7d
4
+ data.tar.gz: ac3417b829147f272c288dd1bb52a5dac9b1cd21
5
5
  SHA512:
6
- metadata.gz: 7883163157131dcb09ca23523dc4ed0039de0a9609d39b45898574e47b45ca1226b74f734235cdeb43f1ea3e65a85cd515784e6db3e150bbd23b2f78b096dc53
7
- data.tar.gz: 3dbd46fcaf211a137fb00bc39f92c6eab5737c294796fbd3186a75dd22f20f7824918fb2e817e00e383c238fcdb464f171976c832d666bbe3161379c399d1132
6
+ metadata.gz: b962a45cef1d7220f15f2900a891a87e9c0df7b5de7b45fb607f09a40a97cf6dbc418ce126d78d9fd4d7205982d5557d7bca9d9f0574ce7a9194ec189b75753f
7
+ data.tar.gz: 1039372deb799338efc78711bf79c0bd54730a951617fc10866d016598b9ee6bc0774d4e66c71a96cba42c7726e29a476825c2d7b3ce8e176e16f419ae1abf38
data/Rakefile CHANGED
@@ -27,7 +27,9 @@ require 'rspec/core/rake_task'
27
27
  require 'coveralls/rake/task'
28
28
  require 'rubocop/rake_task'
29
29
 
30
- RuboCop::RakeTask.new
30
+ RuboCop::RakeTask.new(:rubocop) do |task|
31
+ task.patterns = ['app/**/*.rb', 'lib/**/*.rb']
32
+ end
31
33
  Coveralls::RakeTask.new
32
34
  RSpec::Core::RakeTask.new(:spec)
33
35
  Cucumber::Rake::Task.new do |_|
@@ -1,4 +1,4 @@
1
1
  # Public: The gem version
2
2
  module Bootsy
3
- VERSION = '2.0.12'
3
+ VERSION = '2.0.13'
4
4
  end
@@ -14,50 +14,39 @@ module Bootsy
14
14
  'config/locales/bootsy.en.yml'
15
15
  end
16
16
 
17
- def add_assets
18
- assets_entries.each do |params|
19
- if File.exist?(params[:original])
20
- insert_into_file(params)
21
- else
22
- say_status('not found', "#{params[:original]} not found. You must
23
- manually require Bootsy in your assets pipeline.", :red)
24
- end
25
- end
17
+ def add_javascript
18
+ require_asset(
19
+ 'app/assets/javascripts/application.js',
20
+ "\n//= require bootsy",
21
+ '//= require jquery_ujs'
22
+ )
26
23
  end
27
24
 
28
- def copy_config
29
- template 'bootsy.rb', 'config/initializers/bootsy.rb'
25
+ def add_stylesheet
26
+ require_asset(
27
+ 'app/assets/stylesheets/application.css',
28
+ "\n *= require bootsy",
29
+ '*= require_self'
30
+ )
30
31
  end
31
32
 
32
- def insert_into_file(params)
33
- if File.binread(params[:original]).include?(params[:skip_if])
34
- say_status('skipped', "insert into #{params[:original]}", :yellow)
35
- else
36
- super(
37
- params[:original],
38
- params[:content],
39
- params[:position]
40
- )
41
- end
33
+ def copy_config
34
+ template 'bootsy.rb', 'config/initializers/bootsy.rb'
42
35
  end
43
36
 
44
37
  private
45
38
 
46
- def assets_entries
47
- [
48
- {
49
- original: 'app/assets/javascripts/application.js',
50
- skip_if: 'require bootsy',
51
- content: "\n//= require bootsy",
52
- position: { after: '//= require jquery_ujs' }
53
- },
54
- {
55
- original: 'app/assets/stylesheets/application.css',
56
- skip_if: 'require bootsy',
57
- content: "\n *= require bootsy",
58
- position: { after: '*= require_self' }
59
- }
60
- ]
39
+ def require_asset(destination, content, after_line)
40
+ if File.exist?(destination)
41
+ if File.binread(destination).include?(content)
42
+ say_status('skipped', "insert into #{destination}", :yellow)
43
+ else
44
+ insert_into_file(destination, content, after: after_line)
45
+ end
46
+ else
47
+ say_status('not found', "#{destination} not found. You must
48
+ manually require Bootsy in your assets pipeline.", :red)
49
+ end
61
50
  end
62
51
  end
63
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.12
4
+ version: 2.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volmer Soares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-14 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.2.2
126
+ rubygems_version: 2.4.5
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: A beautiful WYSIWYG editor with image uploads for Rails.