wildland_dev_tools 0.8.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/tasks/setup.rake +9 -11
- data/lib/wildland_dev_tools/updater.rb +20 -14
- data/lib/wildland_dev_tools/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40bc73b0ec0d6ce0ebde969eafad7585c8ad0fb7
|
4
|
+
data.tar.gz: 890e4525c95b5e2f5a8e599bf92ac199dfa2b653
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14c8616886be729c61623c7eea137073ccfaa73a6de66f517ee2841e66575619ef5dd3945d212badebacc9be527bf9135082028c98067508c498c717d1b66bb5
|
7
|
+
data.tar.gz: ab0472a04e966b4e30dc46343a36675a6abc1bcbd5c7bd1f041a0c0e91d43a30e25f70fd9f1f968f014ee9d980442b475fa7ca9ed3cba3ed408c30a00913feda
|
data/README.md
CHANGED
@@ -6,13 +6,13 @@ These are most useful for projects created by [trailhead](https://github.com/wil
|
|
6
6
|
|
7
7
|
Add the following to your `Gemfile`:
|
8
8
|
|
9
|
-
`gem 'wildland_dev_tools', '~>0.
|
9
|
+
`gem 'wildland_dev_tools', '~>1.0.0'
|
10
10
|
|
11
11
|
Typically for wildland projects you will want to put this inside the dev/test block:
|
12
12
|
```
|
13
13
|
group :development, :test do
|
14
14
|
...
|
15
|
-
gem 'wildland_dev_tools', '~>0.
|
15
|
+
gem 'wildland_dev_tools', '~>1.0.0'
|
16
16
|
...
|
17
17
|
end
|
18
18
|
```
|
data/lib/tasks/setup.rake
CHANGED
@@ -9,27 +9,25 @@ namespace :wildland do
|
|
9
9
|
task :update_ruby do
|
10
10
|
needed_ruby_version = File.read('.ruby-version')
|
11
11
|
if WildlandDevTools::Updater.ruby_version_up_to_date?(needed_ruby_version)
|
12
|
-
puts 'up to date.'
|
12
|
+
puts 'Ruby up to date.'
|
13
13
|
else
|
14
|
-
puts 'out of date. Updating.'
|
14
|
+
puts 'Ruby out of date. Updating.'
|
15
15
|
WildlandDevTools::Updater.update_ruby(needed_ruby_version)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
19
|
task :update_node do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
task :update_ember_dependencies do
|
24
|
-
if WildlandDevTools::Updater.ember_cli_rails_installed?
|
25
|
-
puts 'ember-cli-rails installed'
|
26
|
-
system('npm install')
|
20
|
+
needed_node_version = File.read('.nvmrc')
|
21
|
+
if WildlandDevTools::Updater.node_version_up_to_date?(needed_node_version)
|
22
|
+
puts 'Node up to date.'
|
27
23
|
else
|
28
|
-
puts '
|
29
|
-
WildlandDevTools::Updater.
|
24
|
+
puts 'Node out of date. Updating.'
|
25
|
+
WildlandDevTools::Updater.update_node(needed_node_version)
|
30
26
|
end
|
31
27
|
end
|
32
28
|
|
29
|
+
task update_ember_dependencies: 'ember:install'
|
30
|
+
|
33
31
|
desc 'Clears local cache.'
|
34
32
|
task :cache_clear do
|
35
33
|
WildlandDevTools::Updater.clear_ember_cache
|
@@ -14,14 +14,29 @@ module WildlandDevTools
|
|
14
14
|
system('rake demo:seed')
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
18
|
-
|
19
|
-
|
17
|
+
def node_version_up_to_date?(needed_version)
|
18
|
+
current_version = `node -v`
|
19
|
+
current_version.include?(needed_version.strip)
|
20
|
+
end
|
21
|
+
|
22
|
+
def update_node(version)
|
23
|
+
# Try to use the version or install and use
|
24
|
+
system("nvm use #{version}")
|
25
|
+
unless node_version_up_to_date?(version)
|
26
|
+
system("nvm install #{version}")
|
27
|
+
system("nvm use #{version}")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def ruby_version_up_to_date?(needed_version)
|
32
|
+
current_version = `ruby -v`
|
33
|
+
current_version.include?(needed_version.strip)
|
20
34
|
end
|
21
35
|
|
22
36
|
def update_ruby(version)
|
23
37
|
case
|
24
38
|
when system('which rvm > /dev/null 2>&1')
|
39
|
+
warn "[DEPRECATION] `rvm` is deprecated. Please use `rbenv` to manage ruby versions instead."
|
25
40
|
update_ruby_with_rvm(version)
|
26
41
|
when system('which rbenv > /dev/null 2>&1')
|
27
42
|
update_ruby_with_rbenv(version)
|
@@ -40,18 +55,9 @@ module WildlandDevTools
|
|
40
55
|
end
|
41
56
|
|
42
57
|
def update_ruby_with_rbenv(version)
|
58
|
+
system('brew upgrade rbenv ruby-build')
|
43
59
|
system("rbenv install #{version}")
|
44
|
-
|
45
|
-
|
46
|
-
def ember_cli_rails_installed?
|
47
|
-
File.exist?('bin/heroku_install') && File.exist?('package.json')
|
48
|
-
end
|
49
|
-
|
50
|
-
def old_ember_setup
|
51
|
-
Dir.chdir('app-ember') do
|
52
|
-
system('npm install')
|
53
|
-
system('bower install')
|
54
|
-
end
|
60
|
+
system("rbenv rehash")
|
55
61
|
end
|
56
62
|
|
57
63
|
def clear_ember_cache
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wildland_dev_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Weakley
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.5.
|
148
|
+
rubygems_version: 2.5.2
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Wildland Dev Tools
|