danger-missed_localizable_strings 1.0.1 → 1.0.2

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: 4f4c6ae22c02f1aad0180019f959981c1325b513
4
- data.tar.gz: 6b29a8ecb508dc89cca20484cc3d7fbabe4c3937
3
+ metadata.gz: a5f6c5cf75dd5328ffbd1511b2667e5a49dfa73f
4
+ data.tar.gz: f139fe8a364f355bc3b4fdbaf988ccef2b915a33
5
5
  SHA512:
6
- metadata.gz: d66a84567ad272f1d0446346d2dcbdd4bd941768f254d49c7599e950ac358c4096a27317442e69be6598a8f56507471af337b0ba1c5e3f3e31c0e489c19f3e43
7
- data.tar.gz: f2a469100eda338d14bf72875f89f21e905b3ebf4532d18934be65ef0f4a48ea28f888a8ecd0a1a91615789e296004291ab6313c9a6b202eb06f1b3b4986eca1
6
+ metadata.gz: 134fb85e3b527baf73a162d59601db87b3fefd794cf51dc8e14803e8fbaf2867796403e6ed55c2ca0e4e4208d6701f4886b24649c47e5cd91ae8d6d402c37c36
7
+ data.tar.gz: c2b955f4a9f814f8c7f63781cd1217d54d92e64abea5e98e41b4ac16be78e60d5ec8c6969d5b74d67d201f5ef93cbad5ca42b943f5764b5ecf2cae10f7ab59d2
data/.rubocop.yml ADDED
@@ -0,0 +1,148 @@
1
+ # Defaults can be found here: https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.0
5
+ Exclude:
6
+ - 'spec/fixtures/**/*'
7
+ - 'lib/danger/plugin_support/plugin_parser.rb'
8
+
9
+ Style/StringLiterals:
10
+ EnforcedStyle: double_quotes
11
+ Enabled: true
12
+
13
+ # kind_of? is a good way to check a type
14
+ Style/ClassCheck:
15
+ EnforcedStyle: kind_of?
16
+
17
+ # It's better to be more explicit about the type
18
+ Style/BracesAroundHashParameters:
19
+ Enabled: false
20
+
21
+ # specs sometimes have useless assignments, which is fine
22
+ Lint/UselessAssignment:
23
+ Exclude:
24
+ - '**/spec/**/*'
25
+
26
+ # We could potentially enable the 2 below:
27
+ Style/IndentHash:
28
+ Enabled: false
29
+
30
+ Style/AlignHash:
31
+ Enabled: false
32
+
33
+ # HoundCI doesn't like this rule
34
+ Style/DotPosition:
35
+ Enabled: false
36
+
37
+ # We allow !! as it's an easy way to convert ot boolean
38
+ Style/DoubleNegation:
39
+ Enabled: false
40
+
41
+ # Cop supports --auto-correct.
42
+ Lint/UnusedBlockArgument:
43
+ Enabled: false
44
+
45
+ # We want to allow class Fastlane::Class
46
+ Style/ClassAndModuleChildren:
47
+ Enabled: false
48
+
49
+ Metrics/AbcSize:
50
+ Max: 60
51
+
52
+ # The %w might be confusing for new users
53
+ Style/WordArray:
54
+ MinSize: 19
55
+
56
+ # raise and fail are both okay
57
+ Style/SignalException:
58
+ Enabled: false
59
+
60
+ # Better too much 'return' than one missing
61
+ Style/RedundantReturn:
62
+ Enabled: false
63
+
64
+ # Having if in the same line might not always be good
65
+ Style/IfUnlessModifier:
66
+ Enabled: false
67
+
68
+ # and and or is okay
69
+ Style/AndOr:
70
+ Enabled: false
71
+
72
+ # Configuration parameters: CountComments.
73
+ Metrics/ClassLength:
74
+ Max: 320
75
+
76
+ Metrics/CyclomaticComplexity:
77
+ Max: 17
78
+
79
+ # Configuration parameters: AllowURI, URISchemes.
80
+ Metrics/LineLength:
81
+ Max: 370
82
+
83
+ # Configuration parameters: CountKeywordArgs.
84
+ Metrics/ParameterLists:
85
+ Max: 10
86
+
87
+ Metrics/PerceivedComplexity:
88
+ Max: 18
89
+
90
+ # Sometimes it's easier to read without guards
91
+ Style/GuardClause:
92
+ Enabled: false
93
+
94
+ # something = if something_else
95
+ # that's confusing
96
+ Style/ConditionalAssignment:
97
+ Enabled: false
98
+
99
+ # Better to have too much self than missing a self
100
+ Style/RedundantSelf:
101
+ Enabled: false
102
+
103
+ Metrics/MethodLength:
104
+ Max: 60
105
+
106
+ # We're not there yet
107
+ Style/Documentation:
108
+ Enabled: false
109
+
110
+ # Adds complexity
111
+ Style/IfInsideElse:
112
+ Enabled: false
113
+
114
+ # danger specific
115
+
116
+ Style/BlockComments:
117
+ Enabled: false
118
+
119
+ Style/MultilineMethodCallIndentation:
120
+ EnforcedStyle: indented
121
+
122
+ # FIXME: 25
123
+ Metrics/BlockLength:
124
+ Max: 345
125
+
126
+ Style/MixinGrouping:
127
+ Enabled: false
128
+
129
+ Style/FileName:
130
+ Enabled: false
131
+
132
+ Style/IndentHeredoc:
133
+ Enabled: false
134
+
135
+ Style/SpecialGlobalVars:
136
+ Enabled: false
137
+
138
+ PercentLiteralDelimiters:
139
+ PreferredDelimiters:
140
+ "%": ()
141
+ "%i": ()
142
+ "%q": ()
143
+ "%Q": ()
144
+ "%r": "{}"
145
+ "%s": ()
146
+ "%w": ()
147
+ "%W": ()
148
+ "%x": ()
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.2
2
+
3
+ * Support Danger 5.x - antondomashnev
4
+
1
5
  ## 1.0.1
2
6
 
3
7
  * Improve documentation - antondomashnev
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in danger-missed_localizable_strings.gemspec
4
4
  gemspec
data/Gemfile.lock CHANGED
@@ -1,13 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-missed_localizable_strings (1.0.1)
4
+ danger-missed_localizable_strings (1.0.2)
5
5
  danger-plugin-api (~> 1.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.4.0)
10
+ addressable (2.5.1)
11
+ public_suffix (~> 2.0, >= 2.0.2)
11
12
  ast (2.3.0)
12
13
  claide (1.0.1)
13
14
  claide-plugins (0.9.2)
@@ -15,35 +16,31 @@ GEM
15
16
  nap
16
17
  open4 (~> 1.3)
17
18
  coderay (1.1.1)
18
- colored (1.2)
19
- cork (0.2.0)
20
- colored (~> 1.2)
21
- danger (3.5.4)
19
+ colored2 (3.1.2)
20
+ cork (0.3.0)
21
+ colored2 (~> 3.1)
22
+ danger (5.2.0)
22
23
  claide (~> 1.0)
23
24
  claide-plugins (>= 0.9.2)
24
- colored (~> 1.2)
25
+ colored2 (~> 3.1)
25
26
  cork (~> 0.1)
26
27
  faraday (~> 0.9)
27
28
  faraday-http-cache (~> 1.0)
28
29
  git (~> 1)
29
- gitlab (~> 3.7.0)
30
30
  kramdown (~> 1.5)
31
31
  octokit (~> 4.2)
32
32
  terminal-table (~> 1)
33
33
  danger-plugin-api (1.0.0)
34
34
  danger (> 2.0)
35
- diff-lcs (1.2.5)
36
- faraday (0.9.2)
35
+ diff-lcs (1.3)
36
+ faraday (0.12.1)
37
37
  multipart-post (>= 1.2, < 3)
38
38
  faraday-http-cache (1.3.1)
39
39
  faraday (~> 0.8)
40
- ffi (1.9.14)
40
+ ffi (1.9.18)
41
41
  formatador (0.2.5)
42
42
  git (1.3.0)
43
- gitlab (3.7.0)
44
- httparty (~> 0.13.0)
45
- terminal-table
46
- guard (2.14.0)
43
+ guard (2.14.1)
47
44
  formatador (>= 0.2.4)
48
45
  listen (>= 2.7, < 4.0)
49
46
  lumberjack (~> 1.0)
@@ -57,68 +54,65 @@ GEM
57
54
  guard (~> 2.1)
58
55
  guard-compat (~> 1.1)
59
56
  rspec (>= 2.99.0, < 4.0)
60
- httparty (0.13.7)
61
- json (~> 1.8)
62
- multi_xml (>= 0.5.2)
63
- json (1.8.3)
64
- kramdown (1.12.0)
57
+ kramdown (1.13.2)
65
58
  listen (3.0.7)
66
59
  rb-fsevent (>= 0.9.3)
67
60
  rb-inotify (>= 0.9.7)
68
- lumberjack (1.0.10)
61
+ lumberjack (1.0.11)
69
62
  method_source (0.8.2)
70
- multi_xml (0.5.5)
71
63
  multipart-post (2.0.0)
72
64
  nap (1.1.0)
73
65
  nenv (0.3.0)
74
66
  notiffany (0.1.1)
75
67
  nenv (~> 0.1)
76
68
  shellany (~> 0.0)
77
- octokit (4.3.0)
78
- sawyer (~> 0.7.0, >= 0.5.3)
69
+ octokit (4.7.0)
70
+ sawyer (~> 0.8.0, >= 0.5.3)
79
71
  open4 (1.3.4)
80
- parser (2.3.1.4)
72
+ parser (2.4.0.0)
81
73
  ast (~> 2.2)
82
74
  powerpack (0.1.1)
83
75
  pry (0.10.4)
84
76
  coderay (~> 1.1.0)
85
77
  method_source (~> 0.8.1)
86
78
  slop (~> 3.4)
87
- rainbow (2.1.0)
79
+ public_suffix (2.0.5)
80
+ rainbow (2.2.2)
81
+ rake
88
82
  rake (10.5.0)
89
- rb-fsevent (0.9.7)
90
- rb-inotify (0.9.7)
83
+ rb-fsevent (0.9.8)
84
+ rb-inotify (0.9.8)
91
85
  ffi (>= 0.5.0)
92
- rspec (3.5.0)
93
- rspec-core (~> 3.5.0)
94
- rspec-expectations (~> 3.5.0)
95
- rspec-mocks (~> 3.5.0)
96
- rspec-core (3.5.4)
97
- rspec-support (~> 3.5.0)
98
- rspec-expectations (3.5.0)
86
+ rspec (3.6.0)
87
+ rspec-core (~> 3.6.0)
88
+ rspec-expectations (~> 3.6.0)
89
+ rspec-mocks (~> 3.6.0)
90
+ rspec-core (3.6.0)
91
+ rspec-support (~> 3.6.0)
92
+ rspec-expectations (3.6.0)
99
93
  diff-lcs (>= 1.2.0, < 2.0)
100
- rspec-support (~> 3.5.0)
101
- rspec-mocks (3.5.0)
94
+ rspec-support (~> 3.6.0)
95
+ rspec-mocks (3.6.0)
102
96
  diff-lcs (>= 1.2.0, < 2.0)
103
- rspec-support (~> 3.5.0)
104
- rspec-support (3.5.0)
105
- rubocop (0.43.0)
106
- parser (>= 2.3.1.1, < 3.0)
97
+ rspec-support (~> 3.6.0)
98
+ rspec-support (3.6.0)
99
+ rubocop (0.48.1)
100
+ parser (>= 2.3.3.1, < 3.0)
107
101
  powerpack (~> 0.1)
108
102
  rainbow (>= 1.99.1, < 3.0)
109
103
  ruby-progressbar (~> 1.7)
110
104
  unicode-display_width (~> 1.0, >= 1.0.1)
111
105
  ruby-progressbar (1.8.1)
112
- sawyer (0.7.0)
113
- addressable (>= 2.3.5, < 2.5)
114
- faraday (~> 0.8, < 0.10)
106
+ sawyer (0.8.1)
107
+ addressable (>= 2.3.5, < 2.6)
108
+ faraday (~> 0.8, < 1.0)
115
109
  shellany (0.0.1)
116
110
  slop (3.6.0)
117
111
  terminal-table (1.7.3)
118
112
  unicode-display_width (~> 1.1.1)
119
- thor (0.19.1)
120
- unicode-display_width (1.1.1)
121
- yard (0.9.5)
113
+ thor (0.19.4)
114
+ unicode-display_width (1.1.3)
115
+ yard (0.9.9)
122
116
 
123
117
  PLATFORMS
124
118
  ruby
@@ -136,4 +130,4 @@ DEPENDENCIES
136
130
  yard (~> 0.8)
137
131
 
138
132
  BUNDLED WITH
139
- 1.13.2
133
+ 1.13.7
data/Guardfile CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
  # To run, use `bundle exec guard`.
5
5
 
6
- guard :rspec, cmd: 'bundle exec rspec' do
7
- require 'guard/rspec/dsl'
6
+ guard :rspec, cmd: "bundle exec rspec" do
7
+ require "guard/rspec/dsl"
8
8
  dsl = Guard::RSpec::Dsl.new(self)
9
9
 
10
10
  # RSpec files
data/Rakefile CHANGED
@@ -1,23 +1,23 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- require 'rubocop/rake_task'
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "rubocop/rake_task"
4
4
 
5
5
  RSpec::Core::RakeTask.new(:specs)
6
6
 
7
7
  task default: :specs
8
8
 
9
9
  task :spec do
10
- Rake::Task['specs'].invoke
11
- Rake::Task['rubocop'].invoke
12
- Rake::Task['spec_docs'].invoke
10
+ Rake::Task["specs"].invoke
11
+ Rake::Task["rubocop"].invoke
12
+ Rake::Task["spec_docs"].invoke
13
13
  end
14
14
 
15
- desc 'Run RuboCop on the lib/specs directory'
15
+ desc "Run RuboCop on the lib/specs directory"
16
16
  RuboCop::RakeTask.new(:rubocop) do |task|
17
- task.patterns = ['lib/**/*.rb', 'spec/**/*.rb']
17
+ task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
18
18
  end
19
19
 
20
- desc 'Ensure that the plugin passes `danger plugins lint`'
20
+ desc "Ensure that the plugin passes `danger plugins lint`"
21
21
  task :spec_docs do
22
- sh 'bundle exec danger plugins lint'
22
+ sh "bundle exec danger plugins lint"
23
23
  end
@@ -1,43 +1,43 @@
1
1
  # coding: utf-8
2
- # rubocop:disable Metrics/LineLength
3
- lib = File.expand_path('../lib', __FILE__)
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'missed_localizable_strings/gem_version.rb'
5
+ require "missed_localizable_strings/gem_version.rb"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'danger-missed_localizable_strings'
8
+ spec.name = "danger-missed_localizable_strings"
9
9
  spec.version = MissedLocalizableStrings::VERSION
10
- spec.authors = ['Anton Domashnev']
11
- spec.email = ['antondomashnev@gmail.com']
12
- spec.description = 'A Danger plugin to check missing localizable strings.'
13
- spec.summary = 'A Danger plugin to check missing localizable strings.'
14
- spec.homepage = 'https://github.com/Antondomashnev/danger-missed_localizable_strings'
15
- spec.license = 'MIT'
10
+ spec.authors = ["Anton Domashnev"]
11
+ spec.email = ["antondomashnev@gmail.com"]
12
+ spec.description = "A Danger plugin to check missing localizable strings."
13
+ spec.summary = "A Danger plugin to check missing localizable strings."
14
+ spec.homepage = "https://github.com/Antondomashnev/danger-missed_localizable_strings"
15
+ spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ['lib']
20
+ spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
22
+ spec.add_runtime_dependency "danger-plugin-api", "~> 1.0"
23
23
 
24
24
  # General ruby development
25
- spec.add_development_dependency 'bundler', '~> 1.3'
26
- spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
27
 
28
28
  # Testing support
29
- spec.add_development_dependency 'rspec', '~> 3.4'
29
+ spec.add_development_dependency "rspec", "~> 3.4"
30
30
 
31
31
  # Linting code and docs
32
- spec.add_development_dependency 'rubocop', '~> 0.41'
33
- spec.add_development_dependency 'yard', '~> 0.8'
32
+ spec.add_development_dependency "rubocop", "~> 0.41"
33
+ spec.add_development_dependency "yard", "~> 0.8"
34
34
 
35
35
  # Makes testing easy via `bundle exec guard`
36
- spec.add_development_dependency 'guard', '~> 2.14'
37
- spec.add_development_dependency 'guard-rspec', '~> 4.7'
36
+ spec.add_development_dependency "guard", "~> 2.14"
37
+ spec.add_development_dependency "guard-rspec", "~> 4.7"
38
38
 
39
39
  # If you want to work on older builds of ruby
40
- spec.add_development_dependency 'listen', '3.0.7'
40
+ spec.add_development_dependency "listen", "3.0.7"
41
41
 
42
42
  # This gives you the chance to run a REPL inside your tests
43
43
  # via:
@@ -46,6 +46,6 @@ Gem::Specification.new do |spec|
46
46
  # binding.pry
47
47
  #
48
48
  # This will stop test execution and let you inspect the results
49
- spec.add_development_dependency 'pry'
49
+ spec.add_development_dependency "pry"
50
50
  end
51
51
  # rubocop:enable Metrics/LineLength
@@ -1 +1 @@
1
- require 'missed_localizable_strings/gem_version'
1
+ require "missed_localizable_strings/gem_version"
data/lib/danger_plugin.rb CHANGED
@@ -1 +1 @@
1
- require 'missed_localizable_strings/plugin'
1
+ require "missed_localizable_strings/plugin"
@@ -1,3 +1,3 @@
1
1
  module MissedLocalizableStrings
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = "1.0.2".freeze
3
3
  end
@@ -45,7 +45,7 @@ module Danger
45
45
  missed_keyes = most_modified_strings_keys - modified_keyes
46
46
  next if missed_keyes.empty?
47
47
  missed_keyes.each do |key|
48
- missed_entries << { 'file' => file_name, 'key' => key }
48
+ missed_entries << { "file" => file_name, "key" => key }
49
49
  end
50
50
  end
51
51
  missed_entries
@@ -66,8 +66,8 @@ module Danger
66
66
  message << "| ---- | --- |\n"
67
67
 
68
68
  missed_entries.each do |entry|
69
- file = entry['file']
70
- key = entry['key']
69
+ file = entry["file"]
70
+ key = entry["key"]
71
71
 
72
72
  message << "| #{file} | #{key.strip} | \n"
73
73
  end
@@ -83,10 +83,10 @@ module Danger
83
83
  lines = File.readlines(file)
84
84
 
85
85
  # Grab just the keys, we don't need the translation
86
- keys = lines.map { |e| e.split('=').first }
86
+ keys = lines.map { |e| e.split("=").first }
87
87
  # Filter newlines and comments
88
88
  keys = keys.select do |e|
89
- e != "\n" && !e.start_with?('/*') && !e.start_with?('//')
89
+ e != "\n" && !e.start_with?("/*") && !e.start_with?("//")
90
90
  end
91
91
  keys_from_file[file] = keys
92
92
  end
@@ -95,7 +95,7 @@ module Danger
95
95
 
96
96
  def not_deleted_localizable_files
97
97
  files = (git.modified_files + git.added_files) - git.deleted_files
98
- localizable_files = files.select { |line| line.end_with?('.strings') }
98
+ localizable_files = files.select { |line| line.end_with?(".strings") }
99
99
  localizable_files
100
100
  end
101
101
  end
@@ -1,98 +1,98 @@
1
- require File.expand_path('../spec_helper', __FILE__)
1
+ require File.expand_path("../spec_helper", __FILE__)
2
2
 
3
3
  module Danger
4
4
  describe Danger::DangerMissedLocalizableStrings do
5
- it 'should be a plugin' do
5
+ it "should be a plugin" do
6
6
  plugin = Danger::DangerMissedLocalizableStrings.new(nil)
7
7
  expect(plugin).to be_a Danger::Plugin
8
8
  end
9
9
 
10
- describe 'with Dangerfile' do
10
+ describe "with Dangerfile" do
11
11
  before do
12
12
  @dangerfile = testing_dangerfile
13
13
  @my_plugin = @dangerfile.missed_localizable_strings
14
14
  allow(@my_plugin.git).to receive(:deleted_files).and_return([])
15
15
  end
16
16
 
17
- context 'when there are no Localizable.strings in changeset' do
17
+ context "when there are no Localizable.strings in changeset" do
18
18
  before do
19
19
  allow(@my_plugin.git).to receive(:modified_files)
20
- .and_return(['spec/fixtures/SomeModifiedFile.swift'])
20
+ .and_return(["spec/fixtures/SomeModifiedFile.swift"])
21
21
  allow(@my_plugin.git).to receive(:added_files)
22
- .and_return(['spec/fixtures/AddedFile.m'])
22
+ .and_return(["spec/fixtures/AddedFile.m"])
23
23
  @my_plugin.check_localizable_omissions
24
24
  end
25
25
 
26
- it 'does not warn about missed entries in Localizable.strings' do
26
+ it "does not warn about missed entries in Localizable.strings" do
27
27
  expect(@my_plugin.status_report[:markdowns].first).to be_nil
28
28
  end
29
29
  end
30
30
 
31
- context 'when there is one Localizable.strings file in changeset' do
31
+ context "when there is one Localizable.strings file in changeset" do
32
32
  before do
33
33
  allow(@my_plugin.git).to receive(:modified_files)
34
- .and_return(['spec/fixtures/SomeModifiedFile.swift'])
34
+ .and_return(["spec/fixtures/SomeModifiedFile.swift"])
35
35
  allow(@my_plugin.git).to receive(:added_files)
36
- .and_return(['spec/fixtures/LocalizableOrigin.strings'])
36
+ .and_return(["spec/fixtures/LocalizableOrigin.strings"])
37
37
  @my_plugin.check_localizable_omissions
38
38
  end
39
39
 
40
- it 'does not warn about missed entries in Localizable.strings' do
40
+ it "does not warn about missed entries in Localizable.strings" do
41
41
  expect(@my_plugin.status_report[:markdowns].first).to be_nil
42
42
  end
43
43
  end
44
44
 
45
- context 'when there are multiple Localizable.strings in changeset' do
46
- context 'when there are no missed keys in these files' do
45
+ context "when there are multiple Localizable.strings in changeset" do
46
+ context "when there are no missed keys in these files" do
47
47
  before do
48
48
  allow(@my_plugin.git).to receive(:modified_files)
49
- .and_return(['spec/fixtures/LocalizableWithoutOmissions.strings'])
49
+ .and_return(["spec/fixtures/LocalizableWithoutOmissions.strings"])
50
50
  allow(@my_plugin.git).to receive(:added_files)
51
- .and_return(['spec/fixtures/LocalizableOrigin.strings'])
51
+ .and_return(["spec/fixtures/LocalizableOrigin.strings"])
52
52
  @my_plugin.check_localizable_omissions
53
53
  end
54
54
 
55
- it 'does not warn about missed entries in Localizable.strings' do
55
+ it "does not warn about missed entries in Localizable.strings" do
56
56
  expect(@my_plugin.status_report[:markdowns].first).to be_nil
57
57
  end
58
58
  end
59
59
 
60
- context 'when there are missed keys in these files' do
60
+ context "when there are missed keys in these files" do
61
61
  before do
62
- file1 = 'spec/fixtures/LocalizableWithOmissions1.strings'
63
- file2 = 'spec/fixtures/LocalizableWithOmissions2.strings'
62
+ file1 = "spec/fixtures/LocalizableWithOmissions1.strings"
63
+ file2 = "spec/fixtures/LocalizableWithOmissions2.strings"
64
64
  allow(@my_plugin.git).to receive(:modified_files)
65
65
  .and_return([file1, file2])
66
66
  allow(@my_plugin.git).to receive(:added_files)
67
- .and_return(['spec/fixtures/LocalizableOrigin.strings'])
67
+ .and_return(["spec/fixtures/LocalizableOrigin.strings"])
68
68
  @my_plugin.check_localizable_omissions
69
69
  @output = @my_plugin.status_report[:markdowns].first
70
70
  end
71
71
 
72
- it 'warns about missed entries in Localizable.strings' do
72
+ it "warns about missed entries in Localizable.strings" do
73
73
  expect(@output).to_not be_nil
74
74
  end
75
75
 
76
- it 'contains header' do
77
- title = 'Found missed keyes in Localizable.strings files'
76
+ it "contains header" do
77
+ title = "Found missed keyes in Localizable.strings files"
78
78
  expect(@output.to_s).to include(title)
79
79
  end
80
80
 
81
- it 'contains information about the first key from first file' do
82
- file = 'spec/fixtures/LocalizableWithOmissions1.strings'
83
- key = 'Day'
81
+ it "contains information about the first key from first file" do
82
+ file = "spec/fixtures/LocalizableWithOmissions1.strings"
83
+ key = "Day"
84
84
  expect(@output.to_s).to include("| #{file} | \"#{key}\" |")
85
85
  end
86
86
 
87
- it 'contains infromation about the second key from first file' do
88
- file = 'spec/fixtures/LocalizableWithOmissions1.strings'
89
- key = 'Year'
87
+ it "contains infromation about the second key from first file" do
88
+ file = "spec/fixtures/LocalizableWithOmissions1.strings"
89
+ key = "Year"
90
90
  expect(@output.to_s).to include("| #{file} | \"#{key}\" |")
91
91
  end
92
92
 
93
- it 'contains infromation about the first key from second file' do
94
- file = 'spec/fixtures/LocalizableWithOmissions2.strings'
95
- key = 'Hello'
93
+ it "contains infromation about the first key from second file" do
94
+ file = "spec/fixtures/LocalizableWithOmissions2.strings"
95
+ key = "Hello"
96
96
  expect(@output.to_s).to include("| #{file} | \"#{key}\" |")
97
97
  end
98
98
  end
data/spec/spec_helper.rb CHANGED
@@ -1,22 +1,22 @@
1
- require 'pathname'
2
- ROOT = Pathname.new(File.expand_path('../../', __FILE__))
3
- $LOAD_PATH.unshift((ROOT + 'lib').to_s)
4
- $LOAD_PATH.unshift((ROOT + 'spec').to_s)
1
+ require "pathname"
2
+ ROOT = Pathname.new(File.expand_path("../../", __FILE__))
3
+ $LOAD_PATH.unshift((ROOT + "lib").to_s)
4
+ $LOAD_PATH.unshift((ROOT + "spec").to_s)
5
5
 
6
- require 'bundler/setup'
7
- require 'pry'
6
+ require "bundler/setup"
7
+ require "pry"
8
8
 
9
- require 'rspec'
10
- require 'danger'
9
+ require "rspec"
10
+ require "danger"
11
11
 
12
12
  # Use coloured output, it's the best.
13
13
  RSpec.configure do |config|
14
- config.filter_gems_from_backtrace 'bundler'
14
+ config.filter_gems_from_backtrace "bundler"
15
15
  config.color = true
16
16
  config.tty = true
17
17
  end
18
18
 
19
- require 'danger_plugin'
19
+ require "danger_plugin"
20
20
 
21
21
  # These functions are a subset of https://github.com/danger/danger/blob/master/spec/spec_helper.rb
22
22
  # If you are expanding these files, see if it's already been done ^.
@@ -34,7 +34,7 @@ def testing_ui
34
34
 
35
35
  cork = Cork::Board.new(out: @output)
36
36
  def cork.string
37
- out.string.gsub(/\e\[([;\d]+)?m/, '')
37
+ out.string.gsub(/\e\[([;\d]+)?m/, "")
38
38
  end
39
39
  cork
40
40
  end
@@ -44,11 +44,11 @@ end
44
44
  # running a PR on TravisCI
45
45
  def testing_env
46
46
  {
47
- 'HAS_JOSH_K_SEAL_OF_APPROVAL' => 'true',
48
- 'TRAVIS_PULL_REQUEST' => '800',
49
- 'TRAVIS_REPO_SLUG' => 'artsy/eigen',
50
- 'TRAVIS_COMMIT_RANGE' => '759adcbd0d8f...13c4dc8bb61d',
51
- 'DANGER_GITHUB_API_TOKEN' => '123sbdq54erfsd3422gdfio'
47
+ "HAS_JOSH_K_SEAL_OF_APPROVAL" => "true",
48
+ "TRAVIS_PULL_REQUEST" => "800",
49
+ "TRAVIS_REPO_SLUG" => "artsy/eigen",
50
+ "TRAVIS_COMMIT_RANGE" => "759adcbd0d8f...13c4dc8bb61d",
51
+ "DANGER_GITHUB_API_TOKEN" => "123sbdq54erfsd3422gdfio"
52
52
  }
53
53
  end
54
54
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-missed_localizable_strings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Domashnev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -158,6 +158,7 @@ extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
160
  - ".gitignore"
161
+ - ".rubocop.yml"
161
162
  - ".travis.yml"
162
163
  - ".yardoc/checksums"
163
164
  - ".yardoc/complete"