rubocop-blueapron 0.1.1 → 0.2.0

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: 35d1077d0ea4cfb652e9729262175aac2b468b9e
4
- data.tar.gz: bf51a2ffcbc66cecaae81f984f32c222a8723ba9
3
+ metadata.gz: 5509bbfa4c09f8cef195481d18ea853fbfd74e82
4
+ data.tar.gz: 160681cfe59a4c911197b87ffbcba279f90e29a7
5
5
  SHA512:
6
- metadata.gz: 6162fc4ce3875fe1e60839b39aeb388d00ebe26e4f8961af196305e7781358e961716b5016ee8d2fd10a0ef1492d5d3e79564316b1315f920feafd157e6b1393
7
- data.tar.gz: 625c9b0455298f4d93a017423e793d2159ad1cc64d9877865367adf9ae65bd1371641a653fb2bd57d2557ac9189383d156ac24d2ee468fb70b38bf920607661f
6
+ metadata.gz: ad86f1a6afc5657b957b35a99ce5a261e69778c236fa499ddb4ca3ba97d666749b52d14966d796abcc27480799310e6e78a00dcba5aac2b621c01f3b923a1bfd
7
+ data.tar.gz: 81fb03569782394711d9bf04e70b48ef03b6697987822915fb8f675fe714c99fd95abacf34ec73413235c5e4a9d5ce2f72bbec8b5fa43413e088281c57acd533
File without changes
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Blue Apron Style Guide RuboCop extension.
4
4
 
5
+ [![Circle CI](https://circleci.com/gh/blueapron/rubocop-blueapron.svg?style=shield)](https://circleci.com/gh/blueapron/rubocop-blueapron)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add `rubocop-blueapron` to your `Gemfile`
@@ -18,6 +20,10 @@ Configure RuboCop to load the extension in `.rubocop.yml`.
18
20
  require: rubocop-blueapron
19
21
  ```
20
22
 
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
21
27
  ## Contributing
22
28
 
23
29
  1. Fork it!
@@ -40,5 +46,5 @@ Based on [rubocop-rspec](https://github.com/nevir/rubocop-rspec).
40
46
 
41
47
  ## License
42
48
 
43
- `rubocop-blueapron` is MIT licensed. [See the accompanying file](MIT-LICENSE.md) for
49
+ `rubocop-blueapron` is MIT licensed. [See the accompanying file](LICENSE.txt) for
44
50
  the full text.
@@ -0,0 +1,6 @@
1
+ require 'rubocop/blueapron/version'
2
+
3
+ module Rubocop
4
+ module Blueapron
5
+ end
6
+ end
@@ -10,9 +10,9 @@ module RuboCop
10
10
  )
11
11
 
12
12
  def self.defaults!
13
- hash = YAML.load_file(DEFAULT_FILE)
14
13
  puts "configuration from #{DEFAULT_FILE}" if ConfigLoader.debug?
15
- config = ConfigLoader.merge_with_default(hash, DEFAULT_FILE)
14
+ loaded_config = ConfigLoader.load_file(DEFAULT_FILE)
15
+ config = ConfigLoader.merge_with_default(loaded_config, DEFAULT_FILE)
16
16
 
17
17
  ConfigLoader.instance_variable_set(:@default_configuration, config)
18
18
  end
@@ -1,8 +1,8 @@
1
1
  module RuboCop
2
2
  module Blueapron
3
- MAJOR = '0'
4
- MINOR = '1'
5
- PATCH = '1'
3
+ MAJOR = '0'.freeze
4
+ MINOR = '2'.freeze
5
+ PATCH = '0'.freeze
6
6
 
7
7
  VERSION = [MAJOR, MINOR, PATCH].join('.')
8
8
  end
@@ -4,7 +4,7 @@ module RuboCop
4
4
  class DateTimeNowUtc < Cop
5
5
  DATE_TIME_NOW = s(:send, s(:const, nil, :DateTime), :now)
6
6
 
7
- MESSAGE = 'DateTime.now should be interpreted as UTC.'
7
+ MESSAGE = 'DateTime.now should be interpreted as UTC.'.freeze
8
8
 
9
9
  def on_send(node)
10
10
  return if node != DATE_TIME_NOW
@@ -4,7 +4,7 @@ module RuboCop
4
4
  class TimeNowUtc < Cop
5
5
  TIME_NOW = s(:send, s(:const, nil, :Time), :now)
6
6
 
7
- MESSAGE = 'Time.now should be interpreted as UTC.'
7
+ MESSAGE = 'Time.now should be interpreted as UTC.'.freeze
8
8
 
9
9
  def on_send(node)
10
10
  return if node != TIME_NOW
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe RuboCop::Blueapron do
4
+ it 'has a version number' do
5
+ expect(RuboCop::Blueapron::VERSION).not_to be nil
6
+ end
7
+ end
@@ -1,7 +1,7 @@
1
1
  require 'rubocop'
2
2
 
3
3
  rubocop_path = File.join(File.dirname(__FILE__), '../vendor/rubocop')
4
- unless File.directory?(rubocop_path)
4
+ unless File.directory?(File.join(rubocop_path, '.git'))
5
5
  fail "Can't run specs without a local RuboCop checkout. Look in the README."
6
6
  end
7
7
  Dir["#{rubocop_path}/spec/support/**/*.rb"].each { |f| require f }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-blueapron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blue Apron Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-19 00:00:00.000000000 Z
11
+ date: 2017-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.34'
19
+ version: '0.47'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.34'
26
+ version: '0.47'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,24 +86,27 @@ email:
86
86
  executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files:
89
- - LICENSE
89
+ - LICENSE.txt
90
90
  - README.md
91
91
  files:
92
- - LICENSE
92
+ - LICENSE.txt
93
93
  - README.md
94
94
  - config/default.yml
95
95
  - lib/rubocop-blueapron.rb
96
+ - lib/rubocop/blueapron.rb
96
97
  - lib/rubocop/blueapron/inject.rb
97
98
  - lib/rubocop/blueapron/version.rb
98
99
  - lib/rubocop/cop/blueapron/date_time_now_utc.rb
99
100
  - lib/rubocop/cop/blueapron/time_now_utc.rb
101
+ - spec/rubocop/blueapron_spec.rb
100
102
  - spec/rubocop/cop/blueapron/date_time_now_utc_spec.rb
101
103
  - spec/rubocop/cop/blueapron/time_now_utc_spec.rb
102
104
  - spec/spec_helper.rb
103
105
  homepage: https://github.com/blueapron/rubocop-blueapron
104
106
  licenses:
105
107
  - MIT
106
- metadata: {}
108
+ metadata:
109
+ allowed_push_host: https://rubygems.org
107
110
  post_install_message:
108
111
  rdoc_options: []
109
112
  require_paths:
@@ -120,11 +123,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
123
  version: '0'
121
124
  requirements: []
122
125
  rubyforge_project:
123
- rubygems_version: 2.4.5.1
126
+ rubygems_version: 2.6.10
124
127
  signing_key:
125
128
  specification_version: 4
126
129
  summary: Blue Apron Style Guide RuboCop extension.
127
130
  test_files:
131
+ - spec/rubocop/blueapron_spec.rb
128
132
  - spec/rubocop/cop/blueapron/date_time_now_utc_spec.rb
129
133
  - spec/rubocop/cop/blueapron/time_now_utc_spec.rb
130
134
  - spec/spec_helper.rb