wordless 2.1.1 → 2.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: '08ade72040ad52b3a276d76eb2301b73dd0764ff'
4
- data.tar.gz: 99c41db0eb6fe902ce2113ec2fe5b4554a48b3f3
3
+ metadata.gz: 3a3bab08f145c2580453d64cb430ba5874949066
4
+ data.tar.gz: 18b42bd1421b5b56aa490c5a6733de1a36e88f14
5
5
  SHA512:
6
- metadata.gz: 3ce6de5cfa2a1a244c2cf607b869652314a0b361d10cd3d9ad458cc83e6c4ee5c0455b7209e59ac2aa143dbf986c36bebd336bf5da95164dbd5de1dd420bd345
7
- data.tar.gz: 7e2150b3bfcb944e19589c444022e2f51f7cc965e8e14db2720b7f7dfeea87d9fe9879cc7a5ecd89da7a6bd2f3cfd05f035f679aa7df1d7d73c61859f9cbc19c
6
+ metadata.gz: 92b6442dfd7bba9cf2ab98f148140a0011ec5633ab8e7a6804c8944c9fdd446e21a6e7b6282354553c819b8b6c439962ff5b98c3a5f42d2e93e99680f2bb7f1d
7
+ data.tar.gz: db415fffdacf5de128a399c355802ab29e3eabe83644f7e26e76a618ae8ab7e6f013c5e558053fce4ad7da1770f6c9214cd3ea1986c5cdb7ad51f4405ee0a8ef
@@ -1,9 +1,3 @@
1
- Rails:
2
- Enabled: false
3
-
4
- Rails/Output:
5
- Enabled: false
6
-
7
1
  AllCops:
8
2
  TargetRubyVersion: 2.4
9
3
  DisplayCopNames: true
@@ -47,9 +41,106 @@ Style/FrozenStringLiteralComment:
47
41
  Metrics/AbcSize:
48
42
  Max: 40
49
43
 
50
- Lint/HandleExceptions:
44
+ Lint/SuppressedException:
51
45
  Enabled: false
52
46
 
53
47
  Style/FormatStringToken:
54
48
  Exclude:
55
49
  - 'lib/wordless/wordless_cli.rb'
50
+
51
+ Layout/BeginEndAlignment: # (new in 0.91)
52
+ Enabled: true
53
+ Layout/EmptyLinesAroundAttributeAccessor: # (new in 0.83)
54
+ Enabled: true
55
+ Layout/SpaceAroundMethodCallOperator: # (new in 0.82)
56
+ Enabled: true
57
+ Lint/BinaryOperatorWithIdenticalOperands: # (new in 0.89)
58
+ Enabled: true
59
+ Lint/ConstantDefinitionInBlock: # (new in 0.91)
60
+ Enabled: true
61
+ Lint/DeprecatedOpenSSLConstant: # (new in 0.84)
62
+ Enabled: true
63
+ Lint/DuplicateElsifCondition: # (new in 0.88)
64
+ Enabled: true
65
+ Lint/DuplicateRequire: # (new in 0.90)
66
+ Enabled: true
67
+ Lint/DuplicateRescueException: # (new in 0.89)
68
+ Enabled: true
69
+ Lint/EmptyConditionalBody: # (new in 0.89)
70
+ Enabled: true
71
+ Lint/EmptyFile: # (new in 0.90)
72
+ Enabled: true
73
+ Lint/FloatComparison: # (new in 0.89)
74
+ Enabled: true
75
+ Lint/IdentityComparison: # (new in 0.91)
76
+ Enabled: true
77
+ Lint/MissingSuper: # (new in 0.89)
78
+ Enabled: true
79
+ Lint/MixedRegexpCaptureTypes: # (new in 0.85)
80
+ Enabled: true
81
+ Lint/OutOfRangeRegexpRef: # (new in 0.89)
82
+ Enabled: true
83
+ Lint/RaiseException: # (new in 0.81)
84
+ Enabled: true
85
+ Lint/SelfAssignment: # (new in 0.89)
86
+ Enabled: true
87
+ Lint/StructNewOverride: # (new in 0.81)
88
+ Enabled: true
89
+ Lint/TopLevelReturnWithArgument: # (new in 0.89)
90
+ Enabled: true
91
+ Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
92
+ Enabled: true
93
+ Lint/UnreachableLoop: # (new in 0.89)
94
+ Enabled: true
95
+ Lint/UselessMethodDefinition: # (new in 0.90)
96
+ Enabled: true
97
+ Lint/UselessTimes: # (new in 0.91)
98
+ Enabled: true
99
+ Style/AccessorGrouping: # (new in 0.87)
100
+ Enabled: true
101
+ Style/BisectedAttrAccessor: # (new in 0.87)
102
+ Enabled: true
103
+ Style/CaseLikeIf: # (new in 0.88)
104
+ Enabled: true
105
+ Style/CombinableLoops: # (new in 0.90)
106
+ Enabled: true
107
+ Style/ExplicitBlockArgument: # (new in 0.89)
108
+ Enabled: true
109
+ Style/ExponentialNotation: # (new in 0.82)
110
+ Enabled: true
111
+ Style/GlobalStdStream: # (new in 0.89)
112
+ Enabled: true
113
+ Style/HashAsLastArrayItem: # (new in 0.88)
114
+ Enabled: true
115
+ Style/HashEachMethods: # (new in 0.80)
116
+ Enabled: true
117
+ Style/HashLikeCase: # (new in 0.88)
118
+ Enabled: true
119
+ Style/HashTransformKeys: # (new in 0.80)
120
+ Enabled: true
121
+ Style/HashTransformValues: # (new in 0.80)
122
+ Enabled: true
123
+ Style/KeywordParametersOrder: # (new in 0.90)
124
+ Enabled: true
125
+ Style/OptionalBooleanParameter: # (new in 0.89)
126
+ Enabled: true
127
+ Style/RedundantAssignment: # (new in 0.87)
128
+ Enabled: true
129
+ Style/RedundantFetchBlock: # (new in 0.86)
130
+ Enabled: true
131
+ Style/RedundantFileExtensionInRequire: # (new in 0.88)
132
+ Enabled: true
133
+ Style/RedundantRegexpCharacterClass: # (new in 0.85)
134
+ Enabled: true
135
+ Style/RedundantRegexpEscape: # (new in 0.85)
136
+ Enabled: true
137
+ Style/RedundantSelfAssignment: # (new in 0.90)
138
+ Enabled: true
139
+ Style/SingleArgumentDig: # (new in 0.89)
140
+ Enabled: true
141
+ Style/SlicingWithRange: # (new in 0.83)
142
+ Enabled: true
143
+ Style/SoleNestedConditional: # (new in 0.89)
144
+ Enabled: true
145
+ Style/StringConcatenation: # (new in 0.89)
146
+ Enabled: true
@@ -0,0 +1,4 @@
1
+ {
2
+ "solargraph.useBundler": true,
3
+ "ruby.useBundler": true
4
+ }
@@ -0,0 +1,117 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ wordless (2.2.0)
5
+ activesupport
6
+ thor (~> 0.19.1)
7
+ wordpress_tools (~> 1.4.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (5.2.4.4)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+ ast (2.4.1)
18
+ backport (1.1.2)
19
+ byebug (11.1.3)
20
+ coderay (1.1.3)
21
+ concurrent-ruby (1.1.7)
22
+ debase (0.2.4.1)
23
+ debase-ruby_core_source (>= 0.10.2)
24
+ debase-ruby_core_source (0.10.11)
25
+ diff-lcs (1.4.4)
26
+ i18n (1.8.5)
27
+ concurrent-ruby (~> 1.0)
28
+ jaro_winkler (1.5.4)
29
+ maruku (0.7.3)
30
+ method_source (1.0.0)
31
+ mini_portile2 (2.4.0)
32
+ minitest (5.14.2)
33
+ nokogiri (1.10.10)
34
+ mini_portile2 (~> 2.4.0)
35
+ parallel (1.19.2)
36
+ parser (2.7.1.5)
37
+ ast (~> 2.4.1)
38
+ pry (0.13.1)
39
+ coderay (~> 1.1)
40
+ method_source (~> 1.0)
41
+ pry-byebug (3.9.0)
42
+ byebug (~> 11.0)
43
+ pry (~> 0.13.0)
44
+ rainbow (3.0.0)
45
+ rake (13.0.1)
46
+ regexp_parser (1.8.0)
47
+ reverse_markdown (1.4.0)
48
+ nokogiri
49
+ rexml (3.2.4)
50
+ rspec (3.9.0)
51
+ rspec-core (~> 3.9.0)
52
+ rspec-expectations (~> 3.9.0)
53
+ rspec-mocks (~> 3.9.0)
54
+ rspec-core (3.9.2)
55
+ rspec-support (~> 3.9.3)
56
+ rspec-expectations (3.9.2)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.9.0)
59
+ rspec-mocks (3.9.1)
60
+ diff-lcs (>= 1.2.0, < 2.0)
61
+ rspec-support (~> 3.9.0)
62
+ rspec-support (3.9.3)
63
+ rubocop (0.92.0)
64
+ parallel (~> 1.10)
65
+ parser (>= 2.7.1.5)
66
+ rainbow (>= 2.2.2, < 4.0)
67
+ regexp_parser (>= 1.7)
68
+ rexml
69
+ rubocop-ast (>= 0.5.0)
70
+ ruby-progressbar (~> 1.7)
71
+ unicode-display_width (>= 1.4.0, < 2.0)
72
+ rubocop-ast (0.7.0)
73
+ parser (>= 2.7.1.5)
74
+ strscan (>= 1.0.0)
75
+ ruby-debug-ide (0.7.2)
76
+ rake (>= 0.8.1)
77
+ ruby-progressbar (1.10.1)
78
+ solargraph (0.38.0)
79
+ backport (~> 1.1)
80
+ bundler (>= 1.17.2)
81
+ jaro_winkler (~> 1.5)
82
+ maruku (~> 0.7, >= 0.7.3)
83
+ nokogiri (~> 1.9, >= 1.9.1)
84
+ parser (~> 2.3)
85
+ reverse_markdown (~> 1.0, >= 1.0.5)
86
+ rubocop (~> 0.52)
87
+ thor (~> 0.19, >= 0.19.4)
88
+ tilt (~> 2.0)
89
+ yard (~> 0.9)
90
+ strscan (1.0.3)
91
+ thor (0.19.4)
92
+ thread_safe (0.3.6)
93
+ tilt (2.0.10)
94
+ tzinfo (1.2.7)
95
+ thread_safe (~> 0.1)
96
+ unicode-display_width (1.7.0)
97
+ wordpress_tools (1.4.1)
98
+ activesupport (~> 5.0)
99
+ thor (~> 0.19.1)
100
+ yard (0.9.25)
101
+
102
+ PLATFORMS
103
+ ruby
104
+
105
+ DEPENDENCIES
106
+ byebug
107
+ debase
108
+ pry-byebug (~> 3.9)
109
+ rake (~> 13.0.1)
110
+ rspec (~> 3.9.0)
111
+ rubocop
112
+ ruby-debug-ide
113
+ solargraph
114
+ wordless!
115
+
116
+ BUNDLED WITH
117
+ 1.17.3
@@ -9,6 +9,15 @@ The quickest CLI tool to setup a new WordPress locally. [Wordless](https://githu
9
9
  This is a ruby-gem, so we expect you have already installed _ruby_, since it is there by default on Mac and Linux; if it isn't
10
10
  the case, probably you'll like to take a look to [rbenv](https://github.com/sstephenson/rbenv).
11
11
 
12
+ ## Prerequisites
13
+
14
+ The only prerequisite that's up to you is to have the right version of node installed.
15
+ Refer to https://wordless.readthedocs.io/en/latest/_pages/stack/node.html#node for the documentation.
16
+
17
+ The gem will try to `nvm use` into the theme during the process. If it won't work, it will fallback using global
18
+ node version. If your global available node version won't match the required one, then the
19
+ process will fail due to `yarn` compelling about version mismatch.
20
+
12
21
  ## Installation
13
22
 
14
23
  gem install wordless
@@ -1,3 +1,3 @@
1
1
  module Wordless
2
- VERSION = "2.1.1".freeze
2
+ VERSION = "2.2.0".freeze
3
3
  end
@@ -18,14 +18,14 @@ module Wordless
18
18
  PATH::THEMES => 'wp-content/themes'
19
19
  }.freeze
20
20
 
21
- GLOBAL_NODE_MODULES = %w[foreman yarn].freeze
21
+ GLOBAL_NODE_MODULES = %w[yarn].freeze
22
22
 
23
23
  def initialize(thor, options = {})
24
24
  @options = options
25
25
  @thor = thor
26
26
  end
27
27
 
28
- def start(name)
28
+ def start(name) # rubocop:disable Metrics/MethodLength
29
29
  install_global_node_modules
30
30
  install_wordpress_and_wp_cli(name)
31
31
 
@@ -37,8 +37,19 @@ module Wordless
37
37
 
38
38
  Dir.chdir("wp-content/themes/#{name}")
39
39
 
40
- info("Installing theme's node modules...")
41
- run_command("yarn install") || error("Problem installing theme's node modules")
40
+ info('Activate the right node version using NVM')
41
+ if run_command('$SHELL -l -c "nvm use"')
42
+ info("Installing theme's node modules...")
43
+ run_command('$SHELL -l -c "nvm use && yarn setup"') ||
44
+ error("Problem installing theme's node modules")
45
+ else
46
+ warning(
47
+ 'NVM or the required node version is not installed. ' \
48
+ 'Will try to continue using global node.'
49
+ )
50
+ info("Installing theme's node modules...")
51
+ run_command("yarn setup") || error("Problem installing theme's node modules")
52
+ end
42
53
 
43
54
  success("All done! Now yor're ready to use Wordless with following commands:")
44
55
  info("`cd #{name}/wp-content/themes/#{name}`")
@@ -27,17 +27,15 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = ">= 2.4.1"
28
28
 
29
29
  spec.add_dependency "activesupport"
30
- spec.add_dependency "coffee-script"
31
- spec.add_dependency "compass"
32
- spec.add_dependency "sprockets"
33
30
  spec.add_dependency "thor", "~> 0.19.1"
34
31
  spec.add_dependency "wordpress_tools", "~> 1.4.1"
35
- spec.add_dependency "yui-compressor"
36
32
 
37
- spec.add_development_dependency "gem-release"
38
- spec.add_development_dependency "priscilla", "~> 1.0"
39
- spec.add_development_dependency "pry-byebug", "~> 3.0"
40
- spec.add_development_dependency "rake", "~> 10.0"
41
- spec.add_development_dependency "rspec", "~> 3.2.0"
33
+ spec.add_development_dependency "byebug"
34
+ spec.add_development_dependency "debase"
35
+ spec.add_development_dependency "pry-byebug", "~> 3.9"
36
+ spec.add_development_dependency "rake", "~> 13.0.1"
37
+ spec.add_development_dependency "rspec", "~> 3.9.0"
42
38
  spec.add_development_dependency "rubocop"
39
+ spec.add_development_dependency "ruby-debug-ide"
40
+ spec.add_development_dependency "solargraph"
43
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordless
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Étienne Després
@@ -9,10 +9,10 @@ authors:
9
9
  - Filippo Gangi Dino
10
10
  - Ju Liu
11
11
  - Fabrizio Monti
12
- autorequire:
12
+ autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2019-05-31 00:00:00.000000000 Z
15
+ date: 2020-09-28 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
@@ -28,48 +28,6 @@ dependencies:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
30
  version: '0'
31
- - !ruby/object:Gem::Dependency
32
- name: coffee-script
33
- requirement: !ruby/object:Gem::Requirement
34
- requirements:
35
- - - ">="
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- version: '0'
45
- - !ruby/object:Gem::Dependency
46
- name: compass
47
- requirement: !ruby/object:Gem::Requirement
48
- requirements:
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- version: '0'
52
- type: :runtime
53
- prerelease: false
54
- version_requirements: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: '0'
59
- - !ruby/object:Gem::Dependency
60
- name: sprockets
61
- requirement: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: '0'
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: !ruby/object:Gem::Requirement
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: '0'
73
31
  - !ruby/object:Gem::Dependency
74
32
  name: thor
75
33
  requirement: !ruby/object:Gem::Requirement
@@ -99,13 +57,13 @@ dependencies:
99
57
  - !ruby/object:Gem::Version
100
58
  version: 1.4.1
101
59
  - !ruby/object:Gem::Dependency
102
- name: yui-compressor
60
+ name: byebug
103
61
  requirement: !ruby/object:Gem::Requirement
104
62
  requirements:
105
63
  - - ">="
106
64
  - !ruby/object:Gem::Version
107
65
  version: '0'
108
- type: :runtime
66
+ type: :development
109
67
  prerelease: false
110
68
  version_requirements: !ruby/object:Gem::Requirement
111
69
  requirements:
@@ -113,7 +71,7 @@ dependencies:
113
71
  - !ruby/object:Gem::Version
114
72
  version: '0'
115
73
  - !ruby/object:Gem::Dependency
116
- name: gem-release
74
+ name: debase
117
75
  requirement: !ruby/object:Gem::Requirement
118
76
  requirements:
119
77
  - - ">="
@@ -127,63 +85,77 @@ dependencies:
127
85
  - !ruby/object:Gem::Version
128
86
  version: '0'
129
87
  - !ruby/object:Gem::Dependency
130
- name: priscilla
88
+ name: pry-byebug
131
89
  requirement: !ruby/object:Gem::Requirement
132
90
  requirements:
133
91
  - - "~>"
134
92
  - !ruby/object:Gem::Version
135
- version: '1.0'
93
+ version: '3.9'
136
94
  type: :development
137
95
  prerelease: false
138
96
  version_requirements: !ruby/object:Gem::Requirement
139
97
  requirements:
140
98
  - - "~>"
141
99
  - !ruby/object:Gem::Version
142
- version: '1.0'
100
+ version: '3.9'
143
101
  - !ruby/object:Gem::Dependency
144
- name: pry-byebug
102
+ name: rake
145
103
  requirement: !ruby/object:Gem::Requirement
146
104
  requirements:
147
105
  - - "~>"
148
106
  - !ruby/object:Gem::Version
149
- version: '3.0'
107
+ version: 13.0.1
150
108
  type: :development
151
109
  prerelease: false
152
110
  version_requirements: !ruby/object:Gem::Requirement
153
111
  requirements:
154
112
  - - "~>"
155
113
  - !ruby/object:Gem::Version
156
- version: '3.0'
114
+ version: 13.0.1
157
115
  - !ruby/object:Gem::Dependency
158
- name: rake
116
+ name: rspec
159
117
  requirement: !ruby/object:Gem::Requirement
160
118
  requirements:
161
119
  - - "~>"
162
120
  - !ruby/object:Gem::Version
163
- version: '10.0'
121
+ version: 3.9.0
164
122
  type: :development
165
123
  prerelease: false
166
124
  version_requirements: !ruby/object:Gem::Requirement
167
125
  requirements:
168
126
  - - "~>"
169
127
  - !ruby/object:Gem::Version
170
- version: '10.0'
128
+ version: 3.9.0
171
129
  - !ruby/object:Gem::Dependency
172
- name: rspec
130
+ name: rubocop
173
131
  requirement: !ruby/object:Gem::Requirement
174
132
  requirements:
175
- - - "~>"
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
176
141
  - !ruby/object:Gem::Version
177
- version: 3.2.0
142
+ version: '0'
143
+ - !ruby/object:Gem::Dependency
144
+ name: ruby-debug-ide
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
178
150
  type: :development
179
151
  prerelease: false
180
152
  version_requirements: !ruby/object:Gem::Requirement
181
153
  requirements:
182
- - - "~>"
154
+ - - ">="
183
155
  - !ruby/object:Gem::Version
184
- version: 3.2.0
156
+ version: '0'
185
157
  - !ruby/object:Gem::Dependency
186
- name: rubocop
158
+ name: solargraph
187
159
  requirement: !ruby/object:Gem::Requirement
188
160
  requirements:
189
161
  - - ">="
@@ -213,7 +185,9 @@ files:
213
185
  - ".rubocop.yml"
214
186
  - ".ruby-version"
215
187
  - ".vscode/launch.json"
188
+ - ".vscode/settings.json"
216
189
  - Gemfile
190
+ - Gemfile.lock
217
191
  - LICENSE
218
192
  - README.mdown
219
193
  - Rakefile
@@ -234,7 +208,7 @@ homepage: http://github.com/welaika/wordless_gem
234
208
  licenses:
235
209
  - MIT
236
210
  metadata: {}
237
- post_install_message:
211
+ post_install_message:
238
212
  rdoc_options: []
239
213
  require_paths:
240
214
  - lib
@@ -249,9 +223,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
249
223
  - !ruby/object:Gem::Version
250
224
  version: '0'
251
225
  requirements: []
252
- rubyforge_project:
226
+ rubyforge_project:
253
227
  rubygems_version: 2.6.11
254
- signing_key:
228
+ signing_key:
255
229
  specification_version: 4
256
230
  summary: Manage Wordless themes.
257
231
  test_files: []