sumodev 1.1.1 → 1.2.1

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: d7c4a85d1155387313d03bfe65fc900845fcfdd1
4
- data.tar.gz: 9aa3072c02de405b66b066b27eb2db32c4e72e25
3
+ metadata.gz: 5bd7ccfcdd270ce3235d83ced73a93b7209848b9
4
+ data.tar.gz: d06e10db61e6b84da41eae9a7910020638e6a30b
5
5
  SHA512:
6
- metadata.gz: c943a79258319219c3c74170fd62f9abe10467972f0df2e2e8a40fdec3faf131632fa05783833e27cea860e976b3dfb52cbf2f0b936e907d45c77f044a3c38f3
7
- data.tar.gz: 41eee8c780154ab0b2f499cd851fd717c7c63672a7a433a542ff8b623ab850006f4494027dbbd81d46412eece5e6a6defa8d6390ce88d6f8c6f127f4cc180e79
6
+ metadata.gz: f68c419039e200ea161d437ee86908e70a7f26f40efd675487f7eaa8adc2e3ba4446b07781f7b0bcbef67f41d443c193d8c1ff794e1d3e37328e240e22082a3e
7
+ data.tar.gz: 9aa8d81d76fe829a284271bfe2e0132f605ab9ba4460e0de08280ce8ec5350ba6e7828d5ffe1784cbaff5e8d6c6b45ebb277f0e5e6d363b219c095327e49ed22
@@ -91,8 +91,13 @@ class Sumodev::Commands::Project < Sumodev::Command
91
91
  run_command_without_output("open #{repo_url}/edit")
92
92
  continue?("Gitlab will now open, change the default branch to *staging*")
93
93
 
94
+ # ask to add a new app in Errbit and get the errbit_api_key
95
+ run_command_without_output("open https://errors.sumocoders.be/apps/new")
96
+ errbit_api_key = ask("Errbit will now open, enter the Errbit API key:")
97
+
98
+ # move it into place
94
99
  move_project("#{tmp_path}/temp_project", project_path)
95
- populate_capfile("#{project_path}/Capfile", client, project, repo)
100
+ populate_capfile("#{project_path}/Capfile", client, project, repo, errbit_api_key)
96
101
 
97
102
  # install assets
98
103
  install_bundles(project_path) if options[:bundles]
@@ -139,6 +144,7 @@ class Sumodev::Commands::Project < Sumodev::Command
139
144
  "git add Capfile",
140
145
  "git add app/config/parameters_install.yml",
141
146
  "git add package.json",
147
+ "git add npm-shrinkwrap.json",
142
148
  "git add Gemfile.lock",
143
149
  "git add src/Frontend/Themes/Custom",
144
150
  "git commit -m 'Init configuration of the project'",
@@ -149,7 +155,7 @@ class Sumodev::Commands::Project < Sumodev::Command
149
155
  )
150
156
 
151
157
  # deploy
152
- initial_deploy(project_path, client, project, database_name, database_user, database_password)
158
+ initial_deploy(project_path, client, project, database_name, database_user, database_password, errbit_api_key)
153
159
  deploy(project_path, "staging")
154
160
 
155
161
  change_location(project_path)
@@ -225,7 +231,7 @@ class Sumodev::Commands::Project < Sumodev::Command
225
231
  ]
226
232
  end
227
233
 
228
- def populate_capfile(path, client, project, repo)
234
+ def populate_capfile(path, client, project, repo, errbit_api_key)
229
235
  unless File.file?(path)
230
236
  raise "No Capfile found"
231
237
  end
@@ -236,6 +242,7 @@ class Sumodev::Commands::Project < Sumodev::Command
236
242
  .gsub(/set :client,.*/, "set :client, \"#{client}\"")
237
243
  .gsub(/set :project,.*/, "set :project, \"#{project}\"")
238
244
  .gsub(/set :repository,.*/, "set :repository, \"#{repo}\"")
245
+ .gsub(/set :production_errbit_api_key,.*/, "set :production_errbit_api_key, \"#{errbit_api_key}\"")
239
246
 
240
247
  File.write(path, content)
241
248
  end
@@ -253,7 +260,13 @@ class Sumodev::Commands::Project < Sumodev::Command
253
260
  return
254
261
  end
255
262
 
256
- run_command_without_output("npm install", path, "--> Installing node modules")
263
+ run_command_without_output(
264
+ [
265
+ "npm install",
266
+ "npm shrinkwrap --dev",
267
+ ],
268
+ path,
269
+ "--> Installing node modules")
257
270
  end
258
271
 
259
272
  def install_bower_packages(path)
@@ -343,7 +356,7 @@ class Sumodev::Commands::Project < Sumodev::Command
343
356
  end
344
357
  end
345
358
 
346
- def initial_deploy(path, client, project, database_name, database_user, database_password)
359
+ def initial_deploy(path, client, project, database_name, database_user, database_password, errbit_api_key)
347
360
  content = File.read("#{path}/app/config/parameters.yml")
348
361
  content = content
349
362
  .gsub(/database.host:.*/, "database.host: 127.0.0.1")
@@ -351,6 +364,7 @@ class Sumodev::Commands::Project < Sumodev::Command
351
364
  .gsub(/database.user:.*/, "database.user: #{database_user}")
352
365
  .gsub(/database.password:.*/, "database.password: #{database_password}")
353
366
  .gsub(/site.domain:.*/, "site.domain: #{project}.#{client}.sumocoders.eu")
367
+ .gsub(/sumo.errbit_api_key:.*/, "sumo.errbit_api_key: #{errbit_api_key}")
354
368
  File.write("#{path}/app/config/parameters.dev.yml", content)
355
369
 
356
370
  run_command_without_output(
@@ -1,3 +1,3 @@
1
1
  module Sumodev
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumodev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan De Poorter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  requirements: []
115
115
  rubyforge_project:
116
- rubygems_version: 2.4.5
116
+ rubygems_version: 2.4.8
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: SumoCoders Developers gem