xnlogic 1.0.10 → 1.0.11
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.
- checksums.yaml +4 -4
- data/lib/xnlogic/cli/application.rb +5 -3
- data/lib/xnlogic/cli.rb +4 -2
- data/lib/xnlogic/templates/application/Gemfile.tt +2 -0
- data/lib/xnlogic/templates/vagrant/config/vagrant.provision.tt +9 -8
- data/lib/xnlogic/templates/vagrant/config/vagrant.settings.yml.tt +1 -5
- data/lib/xnlogic/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: a6256cedda87c693917dc449a14c9a2a93c8d4e1
|
4
|
+
data.tar.gz: c486a2097064ce59d425d6af197b0379542a512c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c0fb0eda7440d56865936a4ec09293f3aa59438e941ed4dff28faf72d735b47a7e8a399de498a5482c0fa4d3ee119d0382cf88c3da08e83463bc392129ca70b
|
7
|
+
data.tar.gz: bb8d9150ef5829767bb35a710850848526d9d635e60171e0061a8592a3fce1bd559903d1be98c87f8e9180df40c7bacbc68f799e42b1ba30b60cf4abf359e92d
|
@@ -2,7 +2,7 @@ require 'pathname'
|
|
2
2
|
|
3
3
|
module Xnlogic
|
4
4
|
class CLI::Application
|
5
|
-
attr_reader :options, :app_name, :thor, :base_name, :name, :app
|
5
|
+
attr_reader :options, :app_name, :thor, :base_name, :name, :app, :root
|
6
6
|
|
7
7
|
def initialize(options, app_name, thor)
|
8
8
|
@options = options
|
@@ -10,7 +10,8 @@ module Xnlogic
|
|
10
10
|
@thor = thor
|
11
11
|
|
12
12
|
@name = app_name.chomp("/").tr('-', '_') # remove trailing slash if present
|
13
|
-
@
|
13
|
+
@root = options.fetch('root', @name)
|
14
|
+
@app = Pathname.pwd.join(root)
|
14
15
|
end
|
15
16
|
|
16
17
|
def run
|
@@ -27,6 +28,7 @@ module Xnlogic
|
|
27
28
|
:email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
|
28
29
|
:vm_cpus => options['cpus'],
|
29
30
|
:vm_memory => options['memory'],
|
31
|
+
:xn_key => options['key'],
|
30
32
|
}
|
31
33
|
|
32
34
|
base_templates = {
|
@@ -83,7 +85,7 @@ module Xnlogic
|
|
83
85
|
Xnlogic.ui.info ""
|
84
86
|
Xnlogic.ui.info "Then run the following:"
|
85
87
|
Xnlogic.ui.info ""
|
86
|
-
Xnlogic.ui.info "cd #{
|
88
|
+
Xnlogic.ui.info "cd #{root}"
|
87
89
|
Xnlogic.ui.info "vagrant up"
|
88
90
|
Xnlogic.ui.info "vagrant ssh"
|
89
91
|
Xnlogic.ui.info ""
|
data/lib/xnlogic/cli.rb
CHANGED
@@ -54,12 +54,14 @@ module Xnlogic
|
|
54
54
|
end
|
55
55
|
|
56
56
|
desc "application NAME [OPTIONS]", "Creates a skeleton of an XN Logic application"
|
57
|
-
method_option "base", type: :string, banner:
|
58
|
-
"The project is structured ./base_directory/application_directory. Name the base_directory"
|
59
57
|
method_option "cpus", type: :numeric, default: 2, banner:
|
60
58
|
"Number of Virtual CPUs the Development VM should use"
|
61
59
|
method_option "memory", type: :numeric, default: 2048, banner:
|
62
60
|
"Amount of RAM to allow the Development VM to use (in MB)"
|
61
|
+
method_option "key", type: :string, banner:
|
62
|
+
"You must supply an XN key to be able to download the proprietary dependencies needed to boot your application"
|
63
|
+
method_option "root", type: :string, banner:
|
64
|
+
"Optionally specify a different root directory name"
|
63
65
|
def application(name)
|
64
66
|
require 'xnlogic/cli/application'
|
65
67
|
Application.new(options, name, self).run
|
@@ -72,6 +72,7 @@ hr
|
|
72
72
|
echo "Installing JRuby"
|
73
73
|
silent rvm mount -r https://s3.amazonaws.com/jruby.org/downloads/${jruby_version}/jruby-bin-${jruby_version}.tar.gz --verify-downloads 1
|
74
74
|
rvm use jruby-${jruby_version} --default
|
75
|
+
gem update --system
|
75
76
|
gem source -a https://rubygems.org
|
76
77
|
gem source -r http://rubygems.org/
|
77
78
|
|
@@ -108,12 +109,11 @@ hr
|
|
108
109
|
gem install --quiet torquebox-server -v '3.1.1'
|
109
110
|
|
110
111
|
hr
|
111
|
-
echo "
|
112
|
+
echo "Configuring XN gems"
|
112
113
|
hr
|
113
|
-
|
114
|
-
|
115
|
-
gem install --quiet pacer-mcfly
|
116
|
-
rm pacer-mcfly-$mcfly_version-java.gem pacer-model-$pm_version-java.gem
|
114
|
+
gem sources --add http://<%= config[:xn_key] || 'xn:key_required' %>@pacer-model.xnlogic.net
|
115
|
+
gem sources --add http://<%= config[:xn_key] || 'xn:key_required' %>@pacer-mcfly.xnlogic.net
|
116
|
+
gem install --quiet pacer-mcfly pacer-model
|
117
117
|
|
118
118
|
hr
|
119
119
|
echo "Configuring XN"
|
@@ -125,6 +125,7 @@ tar -xjf xn.dev.tbz
|
|
125
125
|
rm xn.dev.tbz
|
126
126
|
cd xn.dev
|
127
127
|
source script/setup_stack
|
128
|
+
echo jruby-${jruby_version} > .ruby-version
|
128
129
|
cd fe/xn.js
|
129
130
|
sudo npm install --loglevel silent
|
130
131
|
cd -
|
@@ -147,10 +148,10 @@ sudo start datomic
|
|
147
148
|
hr
|
148
149
|
echo "Customizing .zshrc for <%= config[:name] %> development"
|
149
150
|
echo "export XN_CLIENT=<%= config[:name] %>" >> ~/.zshrc
|
150
|
-
echo "alias xn-server='(cd ~/xn.dev
|
151
|
-
echo 'alias xn-console="(cd ~/$XN_CLIENT
|
151
|
+
echo "alias xn-server='(cd ~/xn.dev && ./script/start);'" >> ~/.zshrc
|
152
|
+
echo 'alias xn-console="(cd ~/$XN_CLIENT && bundle exec jruby -J-Xmx1g -J-XX:MaxPermSize=200m -S irb -I lib -r dev/console)"' >> ~/.zshrc
|
152
153
|
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*' >> ~/.zshrc
|
153
|
-
echo '(cd $HOME/xn.dev; source script/setup_stack)' >> ~/.zshrc
|
154
|
+
echo '(cd $HOME/xn.dev; JRUBY_OPTS=--dev source script/setup_stack)' >> ~/.zshrc
|
154
155
|
|
155
156
|
hr
|
156
157
|
echo "Configuring <%= config[:name] %>"
|
@@ -2,11 +2,7 @@
|
|
2
2
|
|
3
3
|
XN_CLIENT: '<%= config[:name] %>'
|
4
4
|
timezone: 'America/Toronto'
|
5
|
-
jruby_version: '1.7.
|
5
|
+
jruby_version: '1.7.18'
|
6
6
|
DATOMIC_VERSION: '0.9.4755'
|
7
7
|
vm_memory: '<%= config[:vm_memory] %>'
|
8
8
|
vm_cpus: '<%= config[:vm_cpus] %>'
|
9
|
-
mcfly_version: '0.7.2.pre'
|
10
|
-
mcfly_key: '...'
|
11
|
-
pm_version: '0.6.3.pre'
|
12
|
-
pm_key: '...'
|
data/lib/xnlogic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xnlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darrick Wiebe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.2.2
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: XN Logic command-line tools
|