peak_flow_utils 0.0.1 → 0.1.6

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.
Files changed (65) hide show
  1. checksums.yaml +5 -5
  2. data/{LICENSE.txt → MIT-LICENSE} +1 -1
  3. data/README.md +22 -13
  4. data/Rakefile +20 -30
  5. data/app/assets/config/peak_flow_utils_manifest.js +2 -0
  6. data/app/assets/javascripts/peak_flow_utils/application.js +14 -0
  7. data/app/assets/stylesheets/peak_flow_utils/application.css +15 -0
  8. data/app/controllers/peak_flow_utils/application_controller.rb +13 -0
  9. data/app/controllers/peak_flow_utils/pings/sidekiq_pings_controller.rb +10 -0
  10. data/app/handlers/peak_flow_utils/application_handler.rb +36 -0
  11. data/app/handlers/peak_flow_utils/devise_handler.rb +126 -0
  12. data/app/handlers/peak_flow_utils/file_handler.rb +42 -0
  13. data/app/handlers/peak_flow_utils/model_handler.rb +123 -0
  14. data/app/handlers/peak_flow_utils/rails_handler.rb +206 -0
  15. data/app/handlers/peak_flow_utils/simple_form_handler.rb +76 -0
  16. data/app/handlers/peak_flow_utils/validations_handler.rb +85 -0
  17. data/app/handlers/peak_flow_utils/will_paginate_handler.rb +59 -0
  18. data/app/helpers/peak_flow_utils/application_helper.rb +2 -0
  19. data/app/jobs/peak_flow_utils/application_job.rb +2 -0
  20. data/app/mailers/peak_flow_utils/application_mailer.rb +4 -0
  21. data/app/migrations/20150902155200_create_translation_keys.rb +8 -0
  22. data/app/migrations/20150907070909_create_groups.rb +12 -0
  23. data/app/migrations/20150907090900_create_handlers.rb +9 -0
  24. data/app/migrations/20150908085500_create_translation_values.rb +13 -0
  25. data/app/migrations/20150908090800_create_handler_texts.rb +22 -0
  26. data/app/migrations/20160411190500_create_scanned_files.rb +10 -0
  27. data/app/migrations/peak_flow_utils/application_migration.rb +5 -0
  28. data/app/models/peak_flow_utils/application_record.rb +9 -0
  29. data/app/models/peak_flow_utils/group.rb +22 -0
  30. data/app/models/peak_flow_utils/handler.rb +14 -0
  31. data/app/models/peak_flow_utils/handler_text.rb +46 -0
  32. data/app/models/peak_flow_utils/scanned_file.rb +2 -0
  33. data/app/models/peak_flow_utils/translation_key.rb +8 -0
  34. data/app/models/peak_flow_utils/translation_value.rb +24 -0
  35. data/app/services/peak_flow_utils/application_service.rb +2 -0
  36. data/app/services/peak_flow_utils/attribute_service.rb +32 -0
  37. data/app/services/peak_flow_utils/configuration_service.rb +11 -0
  38. data/app/services/peak_flow_utils/database_initializer_service.rb +39 -0
  39. data/app/services/peak_flow_utils/erb_inspector.rb +71 -0
  40. data/app/services/peak_flow_utils/erb_inspector/file_inspector.rb +137 -0
  41. data/app/services/peak_flow_utils/erb_inspector/translation_inspector.rb +100 -0
  42. data/app/services/peak_flow_utils/group_service.rb +50 -0
  43. data/app/services/peak_flow_utils/handlers_finder_service.rb +25 -0
  44. data/app/services/peak_flow_utils/model_inspector.rb +133 -0
  45. data/app/services/peak_flow_utils/translation_service.rb +138 -0
  46. data/app/services/peak_flow_utils/translations_parser_service.rb +211 -0
  47. data/app/views/layouts/peak_flow_utils/application.html.erb +14 -0
  48. data/bin/peak_flow_rspec_files +4 -2
  49. data/config/routes.rb +2 -0
  50. data/lib/peak_flow_utils.rb +10 -2
  51. data/lib/peak_flow_utils/engine.rb +7 -0
  52. data/lib/peak_flow_utils/handler_helper.rb +39 -0
  53. data/lib/peak_flow_utils/rspec_helper.rb +162 -25
  54. data/lib/peak_flow_utils/version.rb +3 -0
  55. data/lib/tasks/peak_flow_utils_tasks.rake +6 -0
  56. metadata +121 -42
  57. data/.document +0 -5
  58. data/.rspec +0 -1
  59. data/.rubocop.yml +0 -83
  60. data/Gemfile +0 -20
  61. data/Gemfile.lock +0 -93
  62. data/VERSION +0 -1
  63. data/peak_flow_utils.gemspec +0 -65
  64. data/spec/peak_flow_utils_spec.rb +0 -7
  65. data/spec/spec_helper.rb +0 -12
@@ -0,0 +1,3 @@
1
+ module PeakFlowUtils
2
+ VERSION = "0.1.6".freeze
3
+ end
@@ -0,0 +1,6 @@
1
+ namespace :peak_flow_utils do
2
+ task "parse_translations" => :environment do
3
+ PeakFlowUtils::TranslationsParserService.execute!
4
+ raise "stub"
5
+ end
6
+ end
metadata CHANGED
@@ -1,96 +1,176 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peak_flow_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-08 00:00:00.000000000 Z
11
+ date: 2019-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.12.5
20
- type: :development
19
+ version: 5.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 5.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: active-record-transactioner
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: array_enumerator
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
- - - '='
52
+ - - ">="
25
53
  - !ruby/object:Gem::Version
26
- version: 1.12.5
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
- name: jeweler
56
+ name: service_pattern
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - '='
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
- version: 2.1.1
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: redis
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
34
76
  type: :development
35
77
  prerelease: false
36
78
  version_requirements: !ruby/object:Gem::Requirement
37
79
  requirements:
38
- - - '='
80
+ - - ">="
39
81
  - !ruby/object:Gem::Version
40
- version: 2.1.1
82
+ version: '0'
41
83
  - !ruby/object:Gem::Dependency
42
- name: best_practice_project
84
+ name: sidekiq
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
- - - '='
87
+ - - ">="
46
88
  - !ruby/object:Gem::Version
47
- version: 0.0.8
89
+ version: '0'
48
90
  type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
- - - '='
94
+ - - ">="
53
95
  - !ruby/object:Gem::Version
54
- version: 0.0.8
96
+ version: '0'
55
97
  - !ruby/object:Gem::Dependency
56
- name: rubocop
98
+ name: tzinfo-data
57
99
  requirement: !ruby/object:Gem::Requirement
58
100
  requirements:
59
- - - '='
101
+ - - ">="
60
102
  - !ruby/object:Gem::Version
61
- version: 0.43.0
103
+ version: '0'
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
- - - '='
108
+ - - ">="
67
109
  - !ruby/object:Gem::Version
68
- version: 0.43.0
69
- description: Various utilities to help with building on PeakFlow
70
- email: k@spernj.org
110
+ version: '0'
111
+ description: Utilities to be used with PeakFlow.
112
+ email:
113
+ - kaspernj@gmail.com
71
114
  executables:
72
115
  - peak_flow_rspec_files
73
116
  extensions: []
74
- extra_rdoc_files:
75
- - LICENSE.txt
76
- - README.md
117
+ extra_rdoc_files: []
77
118
  files:
78
- - ".document"
79
- - ".rspec"
80
- - ".rubocop.yml"
81
- - Gemfile
82
- - Gemfile.lock
83
- - LICENSE.txt
119
+ - MIT-LICENSE
84
120
  - README.md
85
121
  - Rakefile
86
- - VERSION
122
+ - app/assets/config/peak_flow_utils_manifest.js
123
+ - app/assets/javascripts/peak_flow_utils/application.js
124
+ - app/assets/stylesheets/peak_flow_utils/application.css
125
+ - app/controllers/peak_flow_utils/application_controller.rb
126
+ - app/controllers/peak_flow_utils/pings/sidekiq_pings_controller.rb
127
+ - app/handlers/peak_flow_utils/application_handler.rb
128
+ - app/handlers/peak_flow_utils/devise_handler.rb
129
+ - app/handlers/peak_flow_utils/file_handler.rb
130
+ - app/handlers/peak_flow_utils/model_handler.rb
131
+ - app/handlers/peak_flow_utils/rails_handler.rb
132
+ - app/handlers/peak_flow_utils/simple_form_handler.rb
133
+ - app/handlers/peak_flow_utils/validations_handler.rb
134
+ - app/handlers/peak_flow_utils/will_paginate_handler.rb
135
+ - app/helpers/peak_flow_utils/application_helper.rb
136
+ - app/jobs/peak_flow_utils/application_job.rb
137
+ - app/mailers/peak_flow_utils/application_mailer.rb
138
+ - app/migrations/20150902155200_create_translation_keys.rb
139
+ - app/migrations/20150907070909_create_groups.rb
140
+ - app/migrations/20150907090900_create_handlers.rb
141
+ - app/migrations/20150908085500_create_translation_values.rb
142
+ - app/migrations/20150908090800_create_handler_texts.rb
143
+ - app/migrations/20160411190500_create_scanned_files.rb
144
+ - app/migrations/peak_flow_utils/application_migration.rb
145
+ - app/models/peak_flow_utils/application_record.rb
146
+ - app/models/peak_flow_utils/group.rb
147
+ - app/models/peak_flow_utils/handler.rb
148
+ - app/models/peak_flow_utils/handler_text.rb
149
+ - app/models/peak_flow_utils/scanned_file.rb
150
+ - app/models/peak_flow_utils/translation_key.rb
151
+ - app/models/peak_flow_utils/translation_value.rb
152
+ - app/services/peak_flow_utils/application_service.rb
153
+ - app/services/peak_flow_utils/attribute_service.rb
154
+ - app/services/peak_flow_utils/configuration_service.rb
155
+ - app/services/peak_flow_utils/database_initializer_service.rb
156
+ - app/services/peak_flow_utils/erb_inspector.rb
157
+ - app/services/peak_flow_utils/erb_inspector/file_inspector.rb
158
+ - app/services/peak_flow_utils/erb_inspector/translation_inspector.rb
159
+ - app/services/peak_flow_utils/group_service.rb
160
+ - app/services/peak_flow_utils/handlers_finder_service.rb
161
+ - app/services/peak_flow_utils/model_inspector.rb
162
+ - app/services/peak_flow_utils/translation_service.rb
163
+ - app/services/peak_flow_utils/translations_parser_service.rb
164
+ - app/views/layouts/peak_flow_utils/application.html.erb
87
165
  - bin/peak_flow_rspec_files
166
+ - config/routes.rb
88
167
  - lib/peak_flow_utils.rb
168
+ - lib/peak_flow_utils/engine.rb
169
+ - lib/peak_flow_utils/handler_helper.rb
89
170
  - lib/peak_flow_utils/rspec_helper.rb
90
- - peak_flow_utils.gemspec
91
- - spec/peak_flow_utils_spec.rb
92
- - spec/spec_helper.rb
93
- homepage: http://github.com/kaspernj/peak_flow_utils
171
+ - lib/peak_flow_utils/version.rb
172
+ - lib/tasks/peak_flow_utils_tasks.rake
173
+ homepage: https://github.com/kaspernj/peak_flow_utils
94
174
  licenses:
95
175
  - MIT
96
176
  metadata: {}
@@ -109,9 +189,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
189
  - !ruby/object:Gem::Version
110
190
  version: '0'
111
191
  requirements: []
112
- rubyforge_project:
113
- rubygems_version: 2.5.1
192
+ rubygems_version: 3.1.1
114
193
  signing_key:
115
194
  specification_version: 4
116
- summary: Various utilities to help with building on PeakFlow
195
+ summary: Utilities to be used with PeakFlow.
117
196
  test_files: []
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
@@ -1,83 +0,0 @@
1
- AllCops:
2
- DisplayCopNames: true
3
- DisplayStyleGuide: true
4
- Exclude:
5
- - db/schema.rb
6
- - spec/dummy/db/schema.rb
7
-
8
- # https://github.com/AtomLinter/linter-rubocop/issues/2
9
- Style/FileName:
10
- Enabled: false
11
-
12
- Metrics/CyclomaticComplexity:
13
- Max: 10
14
-
15
- Metrics/LineLength:
16
- Max: 160
17
-
18
- Metrics/MethodLength:
19
- Max: 50
20
-
21
- Metrics/AbcSize:
22
- Max: 25
23
-
24
- Metrics/ClassLength:
25
- Max: 250
26
-
27
- # .find_each is not the same as .each
28
- Rails/FindEach:
29
- Enabled: false
30
-
31
- Style/AccessModifierIndentation:
32
- EnforcedStyle: outdent
33
-
34
- Style/AlignParameters:
35
- EnforcedStyle: with_fixed_indentation
36
-
37
- Style/ClassAndModuleChildren:
38
- EnforcedStyle: compact
39
-
40
- Style/ConditionalAssignment:
41
- Enabled: false
42
-
43
- Style/Documentation:
44
- Enabled: false
45
-
46
- Style/EmptyLines:
47
- Enabled: false
48
-
49
- # Will report offences for many places that are much more readable without using a guard clause
50
- Style/GuardClause:
51
- Enabled: false
52
-
53
- Style/MultilineMethodCallIndentation:
54
- EnforcedStyle: indented
55
-
56
- Style/MultilineOperationIndentation:
57
- EnforcedStyle: indented
58
-
59
- Style/StringLiterals:
60
- EnforcedStyle: double_quotes
61
-
62
- Style/StringLiteralsInInterpolation:
63
- Enabled: false
64
-
65
- Style/NilComparison:
66
- Enabled: false
67
-
68
- Style/SignalException:
69
- EnforcedStyle: only_raise
70
-
71
- Style/MultilineOperationIndentation:
72
- EnforcedStyle: indented
73
-
74
- Style/SpaceInsideHashLiteralBraces:
75
- EnforcedStyle: no_space
76
-
77
- Style/TrivialAccessors:
78
- ExactNameMatch: true
79
- Enabled: true
80
-
81
- # Disabled on purpose: https://github.com/bbatsov/rubocop/issues/1758
82
- Style/ClosingParenthesisIndentation:
83
- Enabled: false
data/Gemfile DELETED
@@ -1,20 +0,0 @@
1
- source "https://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "bundler", "1.12.5"
10
- gem "jeweler", "2.1.1"
11
- end
12
-
13
- group :development, :test do
14
- gem "best_practice_project", "0.0.8", require: false
15
- gem "rubocop", "0.43.0"
16
- end
17
-
18
- group :test do
19
- gem "rspec", "3.5.0"
20
- end
@@ -1,93 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- addressable (2.4.0)
5
- ast (2.3.0)
6
- auto_autoloader (0.0.5)
7
- string-cases
8
- best_practice_project (0.0.8)
9
- auto_autoloader
10
- builder (3.2.2)
11
- descendants_tracker (0.0.4)
12
- thread_safe (~> 0.3, >= 0.3.1)
13
- diff-lcs (1.2.5)
14
- faraday (0.9.2)
15
- multipart-post (>= 1.2, < 3)
16
- git (1.3.0)
17
- github_api (0.14.5)
18
- addressable (~> 2.4.0)
19
- descendants_tracker (~> 0.0.4)
20
- faraday (~> 0.8, < 0.10)
21
- hashie (>= 3.4)
22
- oauth2 (~> 1.0)
23
- hashie (3.4.6)
24
- highline (1.7.8)
25
- jeweler (2.1.1)
26
- builder
27
- bundler (>= 1.0)
28
- git (>= 1.2.5)
29
- github_api
30
- highline (>= 1.6.15)
31
- nokogiri (>= 1.5.10)
32
- rake
33
- rdoc
34
- semver
35
- json (1.8.3)
36
- jwt (1.5.6)
37
- mini_portile2 (2.1.0)
38
- multi_json (1.12.1)
39
- multi_xml (0.5.5)
40
- multipart-post (2.0.0)
41
- nokogiri (1.6.8.1)
42
- mini_portile2 (~> 2.1.0)
43
- oauth2 (1.2.0)
44
- faraday (>= 0.8, < 0.10)
45
- jwt (~> 1.0)
46
- multi_json (~> 1.3)
47
- multi_xml (~> 0.5)
48
- rack (>= 1.2, < 3)
49
- parser (2.3.1.4)
50
- ast (~> 2.2)
51
- powerpack (0.1.1)
52
- rack (2.0.1)
53
- rainbow (2.1.0)
54
- rake (11.3.0)
55
- rdoc (4.2.2)
56
- json (~> 1.4)
57
- rspec (3.5.0)
58
- rspec-core (~> 3.5.0)
59
- rspec-expectations (~> 3.5.0)
60
- rspec-mocks (~> 3.5.0)
61
- rspec-core (3.5.4)
62
- rspec-support (~> 3.5.0)
63
- rspec-expectations (3.5.0)
64
- diff-lcs (>= 1.2.0, < 2.0)
65
- rspec-support (~> 3.5.0)
66
- rspec-mocks (3.5.0)
67
- diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.5.0)
69
- rspec-support (3.5.0)
70
- rubocop (0.43.0)
71
- parser (>= 2.3.1.1, < 3.0)
72
- powerpack (~> 0.1)
73
- rainbow (>= 1.99.1, < 3.0)
74
- ruby-progressbar (~> 1.7)
75
- unicode-display_width (~> 1.0, >= 1.0.1)
76
- ruby-progressbar (1.8.1)
77
- semver (1.0.1)
78
- string-cases (0.0.4)
79
- thread_safe (0.3.5)
80
- unicode-display_width (1.1.1)
81
-
82
- PLATFORMS
83
- ruby
84
-
85
- DEPENDENCIES
86
- best_practice_project (= 0.0.8)
87
- bundler (= 1.12.5)
88
- jeweler (= 2.1.1)
89
- rspec (= 3.5.0)
90
- rubocop (= 0.43.0)
91
-
92
- BUNDLED WITH
93
- 1.12.5
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.1