poise-javascript 1.0.1 → 1.1.0

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/.kitchen.yml +1 -6
  3. data/.travis.yml +36 -15
  4. data/CHANGELOG.md +5 -0
  5. data/Gemfile +3 -1
  6. data/README.md +2 -2
  7. data/Rakefile +1 -1
  8. data/chef/attributes/default.rb +1 -1
  9. data/chef/recipes/default.rb +1 -1
  10. data/lib/poise_javascript.rb +1 -1
  11. data/lib/poise_javascript/cheftie.rb +1 -1
  12. data/lib/poise_javascript/error.rb +1 -1
  13. data/lib/poise_javascript/javascript_command_mixin.rb +1 -1
  14. data/lib/poise_javascript/javascript_providers.rb +1 -1
  15. data/lib/poise_javascript/javascript_providers/base.rb +1 -1
  16. data/lib/poise_javascript/javascript_providers/dummy.rb +1 -1
  17. data/lib/poise_javascript/javascript_providers/iojs.rb +1 -1
  18. data/lib/poise_javascript/javascript_providers/nodejs.rb +4 -3
  19. data/lib/poise_javascript/javascript_providers/scl.rb +3 -29
  20. data/lib/poise_javascript/javascript_providers/system.rb +1 -1
  21. data/lib/poise_javascript/resources.rb +1 -1
  22. data/lib/poise_javascript/resources/javascript_execute.rb +1 -1
  23. data/lib/poise_javascript/resources/javascript_runtime.rb +1 -1
  24. data/lib/poise_javascript/resources/javascript_runtime_test.rb +1 -1
  25. data/lib/poise_javascript/resources/node_package.rb +1 -1
  26. data/lib/poise_javascript/resources/npm_install.rb +6 -2
  27. data/lib/poise_javascript/version.rb +2 -2
  28. data/poise-javascript.gemspec +4 -3
  29. data/test/cookbooks/poise-javascript_test/metadata.rb +1 -1
  30. data/test/cookbooks/poise-javascript_test/recipes/default.rb +2 -2
  31. data/{Berksfile → test/gemfiles/chef-12.1.gemfile} +4 -12
  32. data/test/gemfiles/chef-12.10.gemfile +20 -0
  33. data/test/gemfiles/chef-12.11.gemfile +20 -0
  34. data/test/gemfiles/chef-12.12.gemfile +19 -0
  35. data/test/gemfiles/chef-12.13.gemfile +19 -0
  36. data/test/gemfiles/chef-12.2.gemfile +20 -0
  37. data/test/gemfiles/chef-12.3.gemfile +20 -0
  38. data/test/gemfiles/chef-12.4.gemfile +21 -0
  39. data/test/gemfiles/chef-12.5.gemfile +20 -0
  40. data/test/gemfiles/chef-12.6.gemfile +20 -0
  41. data/test/gemfiles/chef-12.7.gemfile +20 -0
  42. data/test/gemfiles/chef-12.8.gemfile +20 -0
  43. data/test/gemfiles/chef-12.9.gemfile +20 -0
  44. data/test/gemfiles/chef-12.gemfile +2 -2
  45. data/test/gemfiles/master.gemfile +3 -1
  46. data/test/integration/default/serverspec/default_spec.rb +1 -1
  47. data/test/spec/javascript_command_mixin_spec.rb +1 -1
  48. data/test/spec/javascript_providers/base_spec.rb +1 -1
  49. data/test/spec/javascript_providers/dummy_spec.rb +1 -1
  50. data/test/spec/javascript_providers/iojs_spec.rb +1 -1
  51. data/test/spec/javascript_providers/nodejs_spec.rb +5 -5
  52. data/test/spec/javascript_providers/scl_spec.rb +19 -4
  53. data/test/spec/javascript_providers/system_spec.rb +1 -1
  54. data/test/spec/resources/javascript_execute_spec.rb +1 -1
  55. data/test/spec/resources/node_package_spec.rb +1 -1
  56. data/test/spec/resources/npm_install_spec.rb +7 -7
  57. data/test/spec/spec_helper.rb +1 -1
  58. metadata +47 -10
  59. data/.kitchen.travis.yml +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da0e002dc386c589410c1ab46471c2b145121273
4
- data.tar.gz: ca8c9ee6941ecb9c1ad3c65cfc13b00c03c613e1
3
+ metadata.gz: 63ef7c5a0f6685a55de22e16aab101fa73c8fb46
4
+ data.tar.gz: 3327dc745da05d6029edce2abe488d4c809337bc
5
5
  SHA512:
6
- metadata.gz: dfd5db39468531c7db22ad6739a1b63b9848d357677bfc3f5218cf023ac82cde50ecbc42fed8126d27ff279c67875698a53be59cff49cba7bb2c8f7342d96996
7
- data.tar.gz: 8a49e46098856f3c6cd968308b7eedc7dd530a8fb28455c6e92407742d1e82a5442a32e5d733c17d2b646062e96ddc3a18f26ece310fee922d110f06ee15a95f
6
+ metadata.gz: b839b6d67759d69c2ab55895c56558449996d7a2a59b1d74782329e49fec09b44bc5057325aa766b9a3700cba7810335adcd582bf2350011ca9fe9697a8af86b
7
+ data.tar.gz: 03b8bcdccd125ea2a49b2cbee8da5f6a511ef7197b408ce4a2ed6e48c4e9036b539602afd34beec520163ebf69fc25169285792ce7a64e32bdbbab87c66ab0a3
data/.kitchen.yml CHANGED
@@ -1,8 +1,3 @@
1
1
  ---
2
2
  #<% require 'poise_boiler' %>
3
- <%= PoiseBoiler.kitchen(platforms: 'linux') %>
4
-
5
- suites:
6
- - name: default
7
- run_list:
8
- - recipe[poise-javascript_test]
3
+ <%= PoiseBoiler.kitchen %>
data/.travis.yml CHANGED
@@ -1,21 +1,42 @@
1
- ---
2
1
  sudo: false
3
2
  cache: bundler
4
3
  language: ruby
5
- rvm:
6
- - '2.2'
7
- addons:
8
- apt:
9
- packages:
10
- - libgecode-dev
11
4
  env:
12
5
  global:
13
- - USE_SYSTEM_GECODE=true
14
- - KITCHEN_LOCAL_YAML=.kitchen.travis.yml
15
- - secure: NDa++p5J73q5JjH25x8p1IJiCZXHPq4kd2n/ChAHrda+va/+d5cxtIHUDAFtfKJAeIr9W2yAjCm/VBsncZbxAbQai1y6zF9hU/aoWOyYxFWJkB65Off5WiYnWYB9gzDteHzAcXcsLds3KOse4MQPkxmdh0Q9bmK/I/IaPojjajP2bwAYmSIjj4jKLIGKS6VWx1MlyZk2ZHY0x++MChz6D/jTPeQDZgm8ubZIP+I+BoAl7VSZ+5ZhfpGcxE8zEC1iofbyT7JAKQC0FD3u/zHrZzFeqRSXw7Yt+TmdPNr5yzZZyOhez0BVpkDAxPbhZpxcIi4qVeiZ05yS8eu9auLZ7bP05CG3VOWZpGPpzTAh1Z60o0ysGbtSbHuexUR6bxztSvUdEGSgrEhNvPjZvfDdWH/zrVFQxo39t8hvX9n3KmInDw6WKcS0Q7yZPekZK0R+4HrpGvG+QQZkbWvWPX0JPyzT17Az+1kGWfmsFI/XJby9hYvPiiYX6WOhI8Kls4BrFCCKIScW3OE0SIO5JasJ+SeqFGifCppEeuKsJ8bK61l1iurTTYoIl8e69E5Sn2yXa5rfMuKDvRyzGPQFWKw8o+saGeh5A+HOufBM6Bm85XwtAuRq2o9KloSqYhITnfWoj6xWckUuOrCSKsJrtl5QkuG45uaImPv11wiPwz4Sag0=
16
- bundler_args: "--binstubs=$PWD/bin --jobs 3 --retry 3"
6
+ - secure: NDa++p5J73q5JjH25x8p1IJiCZXHPq4kd2n/ChAHrda+va/+d5cxtIHUDAFtfKJAeIr9W2yAjCm/VBsncZbxAbQai1y6zF9hU/aoWOyYxFWJkB65Off5WiYnWYB9gzDteHzAcXcsLds3KOse4MQPkxmdh0Q9bmK/I/IaPojjajP2bwAYmSIjj4jKLIGKS6VWx1MlyZk2ZHY0x++MChz6D/jTPeQDZgm8ubZIP+I+BoAl7VSZ+5ZhfpGcxE8zEC1iofbyT7JAKQC0FD3u/zHrZzFeqRSXw7Yt+TmdPNr5yzZZyOhez0BVpkDAxPbhZpxcIi4qVeiZ05yS8eu9auLZ7bP05CG3VOWZpGPpzTAh1Z60o0ysGbtSbHuexUR6bxztSvUdEGSgrEhNvPjZvfDdWH/zrVFQxo39t8hvX9n3KmInDw6WKcS0Q7yZPekZK0R+4HrpGvG+QQZkbWvWPX0JPyzT17Az+1kGWfmsFI/XJby9hYvPiiYX6WOhI8Kls4BrFCCKIScW3OE0SIO5JasJ+SeqFGifCppEeuKsJ8bK61l1iurTTYoIl8e69E5Sn2yXa5rfMuKDvRyzGPQFWKw8o+saGeh5A+HOufBM6Bm85XwtAuRq2o9KloSqYhITnfWoj6xWckUuOrCSKsJrtl5QkuG45uaImPv11wiPwz4Sag0=
7
+ before_install: gem install bundler
8
+ bundler_args: '--binstubs=$PWD/bin --jobs 3 --retry 3'
17
9
  script:
18
- - "./bin/rake travis"
19
- gemfile:
20
- - test/gemfiles/chef-12.gemfile
21
- - test/gemfiles/master.gemfile
10
+ - ./bin/rake travis
11
+ matrix:
12
+ include:
13
+ - rvm: 2.1.9
14
+ gemfile: test/gemfiles/chef-12.gemfile
15
+ - rvm: 2.1.4
16
+ gemfile: test/gemfiles/chef-12.1.gemfile
17
+ - rvm: 2.1.4
18
+ gemfile: test/gemfiles/chef-12.2.gemfile
19
+ - rvm: 2.1.4
20
+ gemfile: test/gemfiles/chef-12.3.gemfile
21
+ - rvm: 2.1.6
22
+ gemfile: test/gemfiles/chef-12.4.gemfile
23
+ - rvm: 2.1.6
24
+ gemfile: test/gemfiles/chef-12.5.gemfile
25
+ - rvm: 2.1.6
26
+ gemfile: test/gemfiles/chef-12.6.gemfile
27
+ - rvm: 2.1.6
28
+ gemfile: test/gemfiles/chef-12.7.gemfile
29
+ - rvm: 2.1.6
30
+ gemfile: test/gemfiles/chef-12.8.gemfile
31
+ - rvm: 2.1.8
32
+ gemfile: test/gemfiles/chef-12.9.gemfile
33
+ - rvm: 2.1.8
34
+ gemfile: test/gemfiles/chef-12.10.gemfile
35
+ - rvm: 2.1.8
36
+ gemfile: test/gemfiles/chef-12.11.gemfile
37
+ - rvm: 2.1.8
38
+ gemfile: test/gemfiles/chef-12.12.gemfile
39
+ - rvm: 2.1.9
40
+ gemfile: test/gemfiles/chef-12.13.gemfile
41
+ - rvm: 2.3.1
42
+ gemfile: test/gemfiles/master.gemfile
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Poise-Javascript Changelog
2
2
 
3
+ ## v1.1.0
4
+
5
+ * New version list for Node.js.
6
+ * Support new SCL structure and packages.
7
+
3
8
  ## v1.0.1
4
9
 
5
10
  * Update for Chef 12.6 compatibility.
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -29,5 +29,7 @@ end
29
29
 
30
30
  dev_gem 'halite'
31
31
  dev_gem 'poise'
32
+ dev_gem 'poise-archive'
32
33
  dev_gem 'poise-boiler'
33
34
  dev_gem 'poise-languages'
35
+ dev_gem 'poise-profiler'
data/README.md CHANGED
@@ -24,7 +24,7 @@ This cookbook can install Node.js and io.js on Linux and OS X.
24
24
 
25
25
  ## Requirements
26
26
 
27
- Chef 12 or newer is required.
27
+ Chef 12.1 or newer is required.
28
28
 
29
29
  ## Attributes
30
30
 
@@ -317,7 +317,7 @@ The Poise test server infrastructure is sponsored by [Rackspace](https://rackspa
317
317
 
318
318
  ## License
319
319
 
320
- Copyright 2015, Noah Kantrowitz
320
+ Copyright 2015-2016, Noah Kantrowitz
321
321
 
322
322
  Licensed under the Apache License, Version 2.0 (the "License");
323
323
  you may not use this file except in compliance with the License.
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -26,8 +26,9 @@ module PoiseJavascript
26
26
  class NodeJS < Base
27
27
  provides(:nodejs)
28
28
  include PoiseLanguages::Static(
29
- versions: %w{5.4.1 5.3.0 5.2.0 5.1.1 5.0.0 4.2.4 4.1.1 4.0.0 0.12.7 0.11.16 0.10.40 0.9.12 0.8.28 0.7.12 0.6.21 0.5.10},
30
- machines: %w{linux-i686 linux-x86_64 darwin-x86_64},
29
+ # 4.x is still first here because that is what NodeJS recommends.
30
+ versions: %w{4.5.0 6.4.0 6.3.1 6.2.2 6.1.0 6.0.0 5.11.0 5.10.1 5.9.1 5.8.0 5.7.1 5.6.0 5.5.0 5.4.1 5.3.0 5.2.0 5.1.1 5.0.0 4.4.3 4.3.2 4.2.6 4.1.1 4.0.0 0.12.7 0.11.16 0.10.40 0.9.12 0.8.28 0.7.12 0.6.21 0.5.10},
31
+ machines: %w{linux-i686 linux-x86_64 linux-armv6l linux-armv7l linux-arm64 darwin-x86_64},
31
32
  url: 'https://nodejs.org/dist/v%{version}/node-v%{version}-%{kernel}-%{machine}.tar.gz',
32
33
  )
33
34
 
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -26,19 +26,8 @@ module PoiseJavascript
26
26
  class Scl < Base
27
27
  include PoiseLanguages::Scl::Mixin
28
28
  provides(:scl)
29
- scl_package('0.10.35', 'nodejs010', 'nodejs010-nodejs-devel', {
30
- ['redhat', 'centos'] => {
31
- '~> 7.0' => 'https://www.softwarecollections.org/en/scls/rhscl/nodejs010/epel-7-x86_64/download/rhscl-nodejs010-epel-7-x86_64.noarch.rpm',
32
- '~> 6.0' => 'https://www.softwarecollections.org/en/scls/rhscl/nodejs010/epel-6-x86_64/download/rhscl-nodejs010-epel-6-x86_64.noarch.rpm',
33
- },
34
- })
35
-
36
- V8_SCL_URLS = {
37
- ['redhat', 'centos'] => {
38
- '~> 7.0' => 'https://www.softwarecollections.org/en/scls/rhscl/v8314/epel-7-x86_64/download/rhscl-v8314-epel-7-x86_64.noarch.rpm',
39
- '~> 6.0' => 'https://www.softwarecollections.org/en/scls/rhscl/v8314/epel-6-x86_64/download/rhscl-v8314-epel-6-x86_64.noarch.rpm',
40
- },
41
- }
29
+ scl_package('4.4.2', 'rh-nodejs4', 'rh-nodejs4-nodejs-devel', '>= 7.0')
30
+ scl_package('0.10.35', 'nodejs010', 'nodejs010-nodejs-devel')
42
31
 
43
32
  def javascript_binary
44
33
  ::File.join(scl_folder, 'root', 'usr', 'bin', 'node')
@@ -51,26 +40,11 @@ module PoiseJavascript
51
40
  private
52
41
 
53
42
  def install_javascript
54
- install_v8_scl_package
55
43
  install_scl_package
56
44
  end
57
45
 
58
46
  def uninstall_javascript
59
47
  uninstall_scl_package
60
- uninstall_v8_scl_package
61
- end
62
-
63
- def install_v8_scl_package
64
- poise_languages_scl 'v8314' do
65
- parent new_resource
66
- url node.value_for_platform(V8_SCL_URLS)
67
- end
68
- end
69
-
70
- def uninstall_v8_scl_package
71
- install_v8_scl_package.tap do |r|
72
- r.action(:uninstall)
73
- end
74
48
  end
75
49
 
76
50
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -49,6 +49,10 @@ module PoiseJavascript
49
49
  # Enable production install mode.
50
50
  # @return [Boolean]
51
51
  attribute(:production, equal_to: [true, false], default: true)
52
+ # @!attribute timeout
53
+ # Command execution timeout.
54
+ # @return [Integer]
55
+ attribute(:timeout, kind_of: Integer, default: 900)
52
56
  # @!attribute unsafe_perm
53
57
  # Enable --unsafe-perm.
54
58
  # @return [Boolean, nil]
@@ -81,7 +85,7 @@ module PoiseJavascript
81
85
  end
82
86
  # Add the directory for the node binary to $PATH for post-install stuffs.
83
87
  new_path = [::File.dirname(new_resource.javascript), ENV['PATH'].to_s].join(::File::PATH_SEPARATOR)
84
- output = javascript_shell_out!(cmd, cwd: new_resource.path, user: new_resource.user, group: new_resource.group, environment: {'PATH' => new_path}).stdout
88
+ output = javascript_shell_out!(cmd, cwd: new_resource.path, user: new_resource.user, group: new_resource.group, environment: {'PATH' => new_path}, timeout: new_resource.timeout).stdout
85
89
  unless output.strip.empty?
86
90
  # Any output means it did something.
87
91
  new_resource.updated_by_last_action(true)
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module PoiseJavascript
19
- VERSION = '1.0.1'
19
+ VERSION = '1.1.0'
20
20
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -33,9 +33,10 @@ Gem::Specification.new do |spec|
33
33
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
34
34
  spec.require_paths = %w{lib}
35
35
 
36
+ spec.add_dependency 'chef', '~> 12.1'
36
37
  spec.add_dependency 'halite', '~> 1.0'
37
38
  spec.add_dependency 'poise', '~> 2.0'
38
- spec.add_dependency 'poise-languages', '~> 1.2'
39
+ spec.add_dependency 'poise-languages', '~> 2.0'
39
40
 
40
- spec.add_development_dependency 'poise-boiler', '~> 1.0'
41
+ spec.add_development_dependency 'poise-boiler', '~> 1.6'
41
42
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ end
27
27
 
28
28
  javascript_runtime_test 'iojs'
29
29
 
30
- if platform_family?('rhel')
30
+ if platform_family?('rhel') && !node['platform_version'].start_with?('6')
31
31
  javascript_runtime_test 'scl' do
32
32
  version ''
33
33
  runtime_provider :scl
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -14,15 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- source 'https://supermarket.chef.io/'
18
- extension 'halite'
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
19
18
 
20
- # Force the rebuild every time for development.
21
- cookbook 'poise', gem: 'poise'
22
- cookbook 'poise-languages', gem: 'poise-languages'
23
- cookbook 'poise-javascript', gem: 'poise-javascript'
24
-
25
- group :test do
26
- cookbook 'poise-javascript_test', path: 'test/cookbooks/poise-javascript_test'
27
- cookbook 'apt'
28
- end
19
+ gem 'chef', '~> 12.1.2'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.10.24'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.11.18'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright 2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.12.15'
@@ -0,0 +1,19 @@
1
+ #
2
+ # Copyright 2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.13.37'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.2.1'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.3.0'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,21 @@
1
+ #
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.4.3'
20
+ gem 'rack', '< 2'
21
+ gem 'ridley', '4.4.1'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.5.1'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.6.0'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.7.2'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.8.1'
20
+ gem 'rack', '< 2'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Copyright 2016, Noah Kantrowitz
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
+
19
+ gem 'chef', '~> 12.9.41'
20
+ gem 'rack', '< 2'
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -16,4 +16,4 @@
16
16
 
17
17
  eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
18
18
 
19
- gem 'chef', '~> 12.0'
19
+ gem 'chef', '~> 12.13'
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -19,5 +19,7 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
19
19
  gem 'chef', github: 'chef/chef'
20
20
  gem 'halite', github: 'poise/halite'
21
21
  gem 'poise', github: 'poise/poise'
22
+ gem 'poise-archive', github: 'poise/poise-archive'
22
23
  gem 'poise-boiler', github: 'poise/poise-boiler'
23
24
  gem 'poise-languages', github: 'poise/poise-languages'
25
+ gem 'poise-profiler', github: 'poise/poise-profiler'
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -36,12 +36,12 @@ describe PoiseJavascript::JavascriptProviders::NodeJS do
36
36
 
37
37
  context 'with version ""' do
38
38
  let(:javascript_version) { '' }
39
- it_behaves_like 'nodejs provider', 'nodejs-5.4.1', 'https://nodejs.org/dist/v5.4.1/node-v5.4.1-linux-x64.tar.gz'
39
+ it_behaves_like 'nodejs provider', 'nodejs-4.5.0', 'https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz'
40
40
  end # /context with version ""
41
41
 
42
42
  context 'with version nodejs' do
43
43
  let(:javascript_version) { 'nodejs' }
44
- it_behaves_like 'nodejs provider', 'nodejs-5.4.1', 'https://nodejs.org/dist/v5.4.1/node-v5.4.1-linux-x64.tar.gz'
44
+ it_behaves_like 'nodejs provider', 'nodejs-4.5.0', 'https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz'
45
45
  end # /context with version nodejs
46
46
 
47
47
  context 'with version nodejs-0.10' do
@@ -66,7 +66,7 @@ describe PoiseJavascript::JavascriptProviders::NodeJS do
66
66
  version ''
67
67
  end
68
68
  end
69
- it_behaves_like 'nodejs provider', 'nodejs-5.4.1', 'https://nodejs.org/dist/v5.4.1/node-v5.4.1-linux-x86.tar.gz'
69
+ it_behaves_like 'nodejs provider', 'nodejs-4.5.0', 'https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x86.tar.gz'
70
70
  end # /context with 32-bit OS
71
71
 
72
72
  context 'action :uninstall' do
@@ -77,6 +77,6 @@ describe PoiseJavascript::JavascriptProviders::NodeJS do
77
77
  end
78
78
  end
79
79
 
80
- it { is_expected.to uninstall_poise_languages_static('/opt/nodejs-5.4.1') }
80
+ it { is_expected.to uninstall_poise_languages_static('/opt/nodejs-4.5.0') }
81
81
  end # /context action :uninstall
82
82
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -35,7 +35,6 @@ describe PoiseJavascript::JavascriptProviders::Scl do
35
35
  it { is_expected.to install_poise_languages_scl(pkg) }
36
36
  it do
37
37
  expect_any_instance_of(described_class).to receive(:install_scl_package)
38
- expect_any_instance_of(described_class).to receive(:install_v8_scl_package)
39
38
  run_chef
40
39
  end
41
40
  it do
@@ -46,9 +45,26 @@ describe PoiseJavascript::JavascriptProviders::Scl do
46
45
 
47
46
  context 'with version ""' do
48
47
  let(:javascript_version) { '' }
49
- it_behaves_like 'scl provider', 'nodejs010'
48
+ it_behaves_like 'scl provider', 'rh-nodejs4'
50
49
  end # /context with version ""
51
50
 
51
+ context 'with version "0.10"' do
52
+ let(:javascript_version) { '0.10' }
53
+ it_behaves_like 'scl provider', 'nodejs010'
54
+ end # /context with version "0.10"
55
+
56
+ context 'with version "4"' do
57
+ let(:javascript_version) { '4' }
58
+ it_behaves_like 'scl provider', 'rh-nodejs4'
59
+ end # /context with version "4"
60
+
61
+
62
+ context 'with version "" on CentOS 6' do
63
+ let(:chefspec_options) { {platform: 'centos', version: '6.0'} }
64
+ let(:javascript_version) { '' }
65
+ it_behaves_like 'scl provider', 'nodejs010'
66
+ end # /context with version "" on CentOS 6
67
+
52
68
  context 'action :uninstall' do
53
69
  recipe do
54
70
  javascript_runtime 'test' do
@@ -60,7 +76,6 @@ describe PoiseJavascript::JavascriptProviders::Scl do
60
76
 
61
77
  it do
62
78
  expect_any_instance_of(described_class).to receive(:uninstall_scl_package)
63
- expect_any_instance_of(described_class).to receive(:uninstall_v8_scl_package)
64
79
  run_chef
65
80
  end
66
81
  it { expect(javascript_runtime.provider_for_action(:uninstall)).to be_a described_class }
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ describe PoiseJavascript::Resources::NpmInstall do
26
26
  end
27
27
 
28
28
  context 'with a path' do
29
- let(:expect_cmd) { [%w{/npm install --production --unsafe-perm true}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}}] }
29
+ let(:expect_cmd) { [%w{/npm install --production --unsafe-perm true}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}, timeout: 900}] }
30
30
  recipe do
31
31
  npm_install '/myapp'
32
32
  end
@@ -35,7 +35,7 @@ describe PoiseJavascript::Resources::NpmInstall do
35
35
  end # /context with a path
36
36
 
37
37
  context 'with a user' do
38
- let(:expect_cmd) { [%w{/npm install --production --unsafe-perm true}, {cwd: '/myapp', user: 'myuser', group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}}] }
38
+ let(:expect_cmd) { [%w{/npm install --production --unsafe-perm true}, {cwd: '/myapp', user: 'myuser', group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}, timeout: 900}] }
39
39
  recipe do
40
40
  npm_install '/myapp' do
41
41
  user 'myuser'
@@ -46,7 +46,7 @@ describe PoiseJavascript::Resources::NpmInstall do
46
46
  end # /context with a user
47
47
 
48
48
  context 'with production false' do
49
- let(:expect_cmd) { [%w{/npm install --unsafe-perm true}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}}] }
49
+ let(:expect_cmd) { [%w{/npm install --unsafe-perm true}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}, timeout: 900}] }
50
50
  recipe do
51
51
  npm_install '/myapp' do
52
52
  production false
@@ -57,7 +57,7 @@ describe PoiseJavascript::Resources::NpmInstall do
57
57
  end # /context with production false
58
58
 
59
59
  context 'with unsafe_perm false' do
60
- let(:expect_cmd) { [%w{/npm install --production --unsafe-perm false}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}}] }
60
+ let(:expect_cmd) { [%w{/npm install --production --unsafe-perm false}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}, timeout: 900}] }
61
61
  recipe do
62
62
  npm_install '/myapp' do
63
63
  unsafe_perm false
@@ -68,7 +68,7 @@ describe PoiseJavascript::Resources::NpmInstall do
68
68
  end # /context with unsafe_perm false
69
69
 
70
70
  context 'with unsafe_perm nil' do
71
- let(:expect_cmd) { [%w{/npm install --production}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}}] }
71
+ let(:expect_cmd) { [%w{/npm install --production}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}, timeout: 900}] }
72
72
  recipe do
73
73
  npm_install '/myapp' do
74
74
  @unsafe_perm = nil
@@ -79,7 +79,7 @@ describe PoiseJavascript::Resources::NpmInstall do
79
79
  end # /context with unsafe_perm nil
80
80
 
81
81
  context 'with output' do
82
- let(:expect_cmd) { [%w{/npm install --production --unsafe-perm true}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}}] }
82
+ let(:expect_cmd) { [%w{/npm install --production --unsafe-perm true}, {cwd: '/myapp', user: nil, group: nil, environment: {'PATH' => "/:#{ENV['PATH']}"}, timeout: 900}] }
83
83
  let(:expect_output) { <<-EOH }
84
84
  express@4.13.3 node_modules/express
85
85
  ├── escape-html@1.0.2
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright 2015, Noah Kantrowitz
2
+ # Copyright 2015-2016, Noah Kantrowitz
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poise-javascript
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
11
+ date: 2016-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: chef
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '12.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '12.1'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: halite
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +58,28 @@ dependencies:
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '1.2'
61
+ version: '2.0'
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '1.2'
68
+ version: '2.0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: poise-boiler
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '1.0'
75
+ version: '1.6'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '1.0'
82
+ version: '1.6'
69
83
  description: A Chef cookbook for managing Node.js and io.js installations.
70
84
  email:
71
85
  - noah@coderanger.net
@@ -74,11 +88,9 @@ extensions: []
74
88
  extra_rdoc_files: []
75
89
  files:
76
90
  - ".gitignore"
77
- - ".kitchen.travis.yml"
78
91
  - ".kitchen.yml"
79
92
  - ".travis.yml"
80
93
  - ".yardopts"
81
- - Berksfile
82
94
  - CHANGELOG.md
83
95
  - Gemfile
84
96
  - LICENSE
@@ -109,6 +121,19 @@ files:
109
121
  - test/cookbooks/poise-javascript_test/recipes/default.rb
110
122
  - test/docker/docker.ca
111
123
  - test/docker/docker.pem
124
+ - test/gemfiles/chef-12.1.gemfile
125
+ - test/gemfiles/chef-12.10.gemfile
126
+ - test/gemfiles/chef-12.11.gemfile
127
+ - test/gemfiles/chef-12.12.gemfile
128
+ - test/gemfiles/chef-12.13.gemfile
129
+ - test/gemfiles/chef-12.2.gemfile
130
+ - test/gemfiles/chef-12.3.gemfile
131
+ - test/gemfiles/chef-12.4.gemfile
132
+ - test/gemfiles/chef-12.5.gemfile
133
+ - test/gemfiles/chef-12.6.gemfile
134
+ - test/gemfiles/chef-12.7.gemfile
135
+ - test/gemfiles/chef-12.8.gemfile
136
+ - test/gemfiles/chef-12.9.gemfile
112
137
  - test/gemfiles/chef-12.gemfile
113
138
  - test/gemfiles/master.gemfile
114
139
  - test/integration/default/serverspec/default_spec.rb
@@ -143,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
168
  version: '0'
144
169
  requirements: []
145
170
  rubyforge_project:
146
- rubygems_version: 2.4.8
171
+ rubygems_version: 2.6.4
147
172
  signing_key:
148
173
  specification_version: 4
149
174
  summary: A Chef cookbook for managing Node.js and io.js installations.
@@ -152,6 +177,19 @@ test_files:
152
177
  - test/cookbooks/poise-javascript_test/recipes/default.rb
153
178
  - test/docker/docker.ca
154
179
  - test/docker/docker.pem
180
+ - test/gemfiles/chef-12.1.gemfile
181
+ - test/gemfiles/chef-12.10.gemfile
182
+ - test/gemfiles/chef-12.11.gemfile
183
+ - test/gemfiles/chef-12.12.gemfile
184
+ - test/gemfiles/chef-12.13.gemfile
185
+ - test/gemfiles/chef-12.2.gemfile
186
+ - test/gemfiles/chef-12.3.gemfile
187
+ - test/gemfiles/chef-12.4.gemfile
188
+ - test/gemfiles/chef-12.5.gemfile
189
+ - test/gemfiles/chef-12.6.gemfile
190
+ - test/gemfiles/chef-12.7.gemfile
191
+ - test/gemfiles/chef-12.8.gemfile
192
+ - test/gemfiles/chef-12.9.gemfile
155
193
  - test/gemfiles/chef-12.gemfile
156
194
  - test/gemfiles/master.gemfile
157
195
  - test/integration/default/serverspec/default_spec.rb
@@ -166,4 +204,3 @@ test_files:
166
204
  - test/spec/resources/node_package_spec.rb
167
205
  - test/spec/resources/npm_install_spec.rb
168
206
  - test/spec/spec_helper.rb
169
- has_rdoc:
data/.kitchen.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- ---
2
- driver:
3
- name: docker
4
- binary: "./docker"
5
- socket: tcp://docker.poise.io:443
6
- tls_verify: true
7
- tls_cacert: test/docker/docker.ca
8
- tls_cert: test/docker/docker.pem
9
- tls_key: test/docker/docker.key