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 +4 -4
- data/{LICENSE → LICENSE.txt} +0 -0
- data/README.md +7 -1
- data/lib/rubocop/blueapron.rb +6 -0
- data/lib/rubocop/blueapron/inject.rb +2 -2
- data/lib/rubocop/blueapron/version.rb +3 -3
- data/lib/rubocop/cop/blueapron/date_time_now_utc.rb +1 -1
- data/lib/rubocop/cop/blueapron/time_now_utc.rb +1 -1
- data/spec/rubocop/blueapron_spec.rb +7 -0
- data/spec/spec_helper.rb +1 -1
- metadata +12 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5509bbfa4c09f8cef195481d18ea853fbfd74e82
|
4
|
+
data.tar.gz: 160681cfe59a4c911197b87ffbcba279f90e29a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad86f1a6afc5657b957b35a99ce5a261e69778c236fa499ddb4ca3ba97d666749b52d14966d796abcc27480799310e6e78a00dcba5aac2b621c01f3b923a1bfd
|
7
|
+
data.tar.gz: 81fb03569782394711d9bf04e70b48ef03b6697987822915fb8f675fe714c99fd95abacf34ec73413235c5e4a9d5ce2f72bbec8b5fa43413e088281c57acd533
|
data/{LICENSE → LICENSE.txt}
RENAMED
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](
|
49
|
+
`rubocop-blueapron` is MIT licensed. [See the accompanying file](LICENSE.txt) for
|
44
50
|
the full text.
|
@@ -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
|
-
|
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
|
@@ -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
|
data/spec/spec_helper.rb
CHANGED
@@ -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.
|
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:
|
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.
|
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.
|
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.
|
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
|