isomorfeus-installer 1.0.0.delta3 → 1.0.0.delta4

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
  SHA256:
3
- metadata.gz: 021452c39288a477336e084326e6cee2d18d21665f0672a52dece9ae5330e416
4
- data.tar.gz: 85ac2153a47d6a5efc9d31349cdd0ebb577d42d5539c89e1e7005409370b3a21
3
+ metadata.gz: a9f3de9a3999445ae6d8e6a83ac0a3ee219d248bd7ba35d53aae9e7dbb12e044
4
+ data.tar.gz: 8d7556c94f6e1fdabb7fad5006d9f2e81303b278e9a23eae0c378e3468b1e7fe
5
5
  SHA512:
6
- metadata.gz: fc9f0216257a00279cfd4631b60db3cd8e8e6a7fe8855e891a4da260e95388b59a93478cc57e193a0e4ba73cebd9435af54094921ff1a3ad76fc8afc4336d0b0
7
- data.tar.gz: addf109c72a42ecb439c7e7183508bb2e040d8a34e2cdc2c1433aba7508bc952b145501edacd7dce9923e2b23659211715cd28e4c66929e8babc61fea972dada
6
+ metadata.gz: 5c2f308f17c9857a689f7b86188fd4831407c65f4dda6f307cbb1de4a1e167ba6428ca3b915bfc2c6c7c0702e28d911ce212e281596079909a9cf0dbba41c00b
7
+ data.tar.gz: 57b6e511e8bb7d744efad79be36ee95b347dd05bbc7e7336b0fb5748d4822dfee36a2f7fc0e786f33cf143e86bf5d6f6d2a66ae0db689525b1dcf75ec18915d0
data/bin/yandle ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if %w[update upgrade].include?(ARGV[0])
4
+ system('yarn upgrade')
5
+ system('bundle update')
6
+ else
7
+ system('yarn install')
8
+ system('bundle install')
9
+ end
@@ -10,16 +10,16 @@ module Isomorfeus
10
10
  option :operation, default: false, type: :boolean, aliases: '-o', desc: "Use operation module. (optional, requires transport)"
11
11
  option :policy, default: false, type: :boolean, aliases: '-p', desc: "Use policy module. (optional, requires transport)"
12
12
  option :rack_server, default: 'puma', aliases: '-r',
13
- desc: "Select rack server, one of: #{Isomorfeus::Installer.sorted_rack_servers.join(', ')}. (optional, default: puma)"
13
+ desc: "Select rack server, one of: #{Isomorfeus::Installer.sorted_rack_servers.join(', ')}. (optional)"
14
14
  option :transport, required: false, aliases: '-t',
15
15
  desc: "Select transport, one of: #{Isomorfeus::Installer.sorted_transports.join(', ')}. (optional if no other features that depend on a transport are used)"
16
16
  option :transport_store, required: false, aliases: '-e',
17
17
  desc: "Select transport store, one of: #{Isomorfeus::Installer.sorted_transport_stores.join(', ')}. (optional with no transport, required if a transport is used)"
18
-
18
+ option :yarn_and_bundle, default: true, required: false, type: :boolean, aliases: '-y', desc: "Execute yarn install and bundle install. (optional)"
19
19
  def new(project_name)
20
20
  Isomorfeus::Installer.set_project_names(project_name)
21
21
  Isomorfeus::Installer.options = options
22
- Isomorfeus::Installer::NewProject.execute
22
+ Isomorfeus::Installer::NewProject.execute(yarn_and_bundle: options[:yarn_and_bundle])
23
23
  end
24
24
  end
25
25
  end
@@ -10,12 +10,12 @@ module Isomorfeus
10
10
  Isomorfeus::Installer
11
11
  end
12
12
 
13
- def self.execute
13
+ def self.execute(yarn_and_bundle: true)
14
14
  begin
15
- Dir.mkdir(installer.project_name)
16
- Dir.chdir(installer.project_name)
15
+ Dir.mkdir(installer.project_dir)
16
+ Dir.chdir(installer.project_dir)
17
17
  rescue
18
- puts "Directory #{installer.project_name} could not be created!"
18
+ puts "Directory #{installer.project_dir} could not be created!"
19
19
  exit 1
20
20
  end
21
21
 
@@ -41,8 +41,12 @@ module Isomorfeus
41
41
  Isomorfeus::Installer.create_gemfile
42
42
  Isomorfeus::Installer.create_procfile
43
43
 
44
- `bundle install`
45
- `yarn install`
44
+ if yarn_and_bundle
45
+ puts 'Executing yarn install:'
46
+ system('yarn install')
47
+ puts 'Executing bundle install:'
48
+ system('bundle install')
49
+ end
46
50
 
47
51
  Dir.chdir('..')
48
52
  puts 'Installation finished, make your dreams come true :)'
@@ -40,6 +40,7 @@ module Isomorfeus
40
40
 
41
41
  if options.key?(:rack_server) && installer.sorted_rack_servers.include?(options[:rack_server])
42
42
  installer.rack_server = installer.rack_servers[options[:rack_server]]
43
+ installer.rack_server_name = options[:rack_server]
43
44
  else
44
45
  installer.rack_server = installer.rack_servers['puma']
45
46
  end
@@ -9,7 +9,7 @@ Isomorfeus::Installer.add_rack_server('falcon', {
9
9
  })
10
10
 
11
11
  Isomorfeus::Installer.add_rack_server('iodine', {
12
- gems: [ { name: 'falcon', version: "~> 0.7.31", require: false } ],
12
+ gems: [ { name: 'iodine', version: "~> 0.7.31", require: false } ],
13
13
  start_command: 'bundle exec iodine'
14
14
  })
15
15
 
@@ -8,11 +8,11 @@ gem 'roda', '~> 3.19.0'
8
8
 
9
9
  gem 'opal', github: 'janbiedermann/opal', branch: 'es6_modules_1_1'
10
10
  gem 'opal-activesupport', github: 'janbiedermann/opal-activesupport', branch: 'relax'
11
- gem 'opal-webpack-loader', '~> 0.8.3'
11
+ gem 'opal-webpack-loader', '~> 0.8.4'
12
12
 
13
13
  gem 'opal-autoloader', '~> 0.0.3'
14
- gem 'isomorfeus-redux', '~> 4.0.2'
15
- gem 'isomorfeus-react', '~> 16.6.3'
14
+ gem 'isomorfeus-redux', '~> 4.0.3'
15
+ gem 'isomorfeus-react', '~> 16.6.6'
16
16
  #<%= transport_gems %>
17
17
  #<%= database_gems %>
18
18
  #<%= policy_gems %>
@@ -21,5 +21,5 @@ gem 'isomorfeus-react', '~> 16.6.3'
21
21
 
22
22
  group :test do
23
23
  gem 'rspec', '~> 3.6.0'
24
- gem 'isomorfeus-puppetmaster', '~> 0.2.2'
24
+ gem 'isomorfeus-puppetmaster', '~> 0.2.7'
25
25
  end
@@ -2,7 +2,7 @@
2
2
  "name": "<%= application_name %>",
3
3
  "private": true,
4
4
  "dependencies": {
5
- "opal-webpack-loader": "^0.8.3",
5
+ "opal-webpack-loader": "^0.8.4",
6
6
  "react": "16.6",
7
7
  "react-dom": "16.6",
8
8
  "react-router": "^4.3.1",
@@ -10,6 +10,7 @@ ASSETS_COMPILED ||= `yarn run production_build`
10
10
 
11
11
  Isomorfeus::Puppetmaster.download_path = File.join(Dir.pwd, 'download_path_tmp')
12
12
  Isomorfeus::Puppetmaster.driver = :chromium
13
+ Isomorfeus::Puppetmaster.server = :<%= rack_server %>
13
14
  Isomorfeus::Puppetmaster.app = <%= app_class %>
14
15
  Isomorfeus::Puppetmaster.boot_app
15
16
 
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Installer
3
- VERSION = '1.0.0.delta3'
3
+ VERSION = '1.0.0.delta4'
4
4
  end
5
5
  end
@@ -40,9 +40,11 @@ module Isomorfeus
40
40
  attr_accessor :i18n
41
41
  attr_accessor :operation
42
42
  attr_accessor :policy
43
+ attr_reader :project_dir
43
44
  attr_reader :project_env
44
45
  attr_reader :project_name
45
46
  attr_accessor :rack_server
47
+ attr_accessor :rack_server_name
46
48
  attr_accessor :transport
47
49
  attr_accessor :transport_store
48
50
 
@@ -50,17 +52,17 @@ module Isomorfeus
50
52
  attr_reader :options
51
53
  end
52
54
 
53
- def self.set_project_names(pro_name)
54
- @project_name = pro_name.underscore
55
- @app_class = pro_name.camelize + 'App'
56
- @app_require = pro_name.underscore + '_app'
57
- @component_name = pro_name.camelize + 'Component'
58
- @project_env = pro_name.underscore.upcase + '_ENV'
55
+ def self.set_project_names(pro_dir)
56
+ @project_dir = pro_dir
57
+ @project_name = pro_dir.underscore
58
+ @app_class = @project_name.camelize + 'App'
59
+ @app_require = @project_name + '_app'
60
+ @component_name = @app_class + 'Component'
61
+ @project_env = @project_name.upcase + '_ENV'
59
62
  end
60
63
 
61
64
  def self.options=(options)
62
65
  Isomorfeus::Installer::OptionsMangler.mangle_options(options)
63
- puts "options: #{options}"
64
66
  @options = options
65
67
  end
66
68
 
@@ -180,6 +182,7 @@ module Isomorfeus
180
182
  unless Dir.exist?(directory)
181
183
  puts "Creating directory #{directory}."
182
184
  FileUtils.mkdir_p(directory)
185
+ FileUtils.touch(File.join(directory, '.keep'))
183
186
  end
184
187
  end
185
188
 
@@ -307,7 +310,7 @@ module Isomorfeus
307
310
  end
308
311
 
309
312
  def self.create_spec
310
- data_hash = { app_class: app_class, app_require: app_require, project_env: project_env }
313
+ data_hash = { app_class: app_class, app_require: app_require, project_env: project_env, rack_server: rack_server_name }
311
314
  create_file_from_template('spec_helper.rb.erb', File.join('spec', 'spec_helper.rb'), data_hash)
312
315
  create_file_from_template('test_spec.rb.erb', File.join('spec', 'test_spec.rb'), {})
313
316
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-installer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.delta3
4
+ version: 1.0.0.delta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-22 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -126,11 +126,13 @@ description: Create new isomorfeus-framework applications with ease.
126
126
  email: jan@kursator.de
127
127
  executables:
128
128
  - isomorfeus
129
+ - yandle
129
130
  extensions: []
130
131
  extra_rdoc_files: []
131
132
  files:
132
133
  - LICENSE
133
134
  - bin/isomorfeus
135
+ - bin/yandle
134
136
  - lib/isomorfeus/installer.rb
135
137
  - lib/isomorfeus/installer/cli.rb
136
138
  - lib/isomorfeus/installer/databases/arangodb.rb