xnlogic 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0322e021ba7a9c14d5d9843588dd6e41d622b96
4
- data.tar.gz: cf6a99ce1e85b0f1bd382909ce8497c5a0f57cca
3
+ metadata.gz: 53c0bbebd47061647f31daa55f97fcb6d509ce8c
4
+ data.tar.gz: 6e960006fe662c8a6d01e9dffee51ea5c7fad708
5
5
  SHA512:
6
- metadata.gz: f33e4d16f59ed681039d6c488a615d0f2fa556a5c6aeb75994a6a940604a38df0d866a603f4911c4adaceee7eb5a287494877dbb59f3c4516e9898029cda2928
7
- data.tar.gz: 4095c0df0530cfa5c8e0c64124a713ac5c9c707e8c0d4a3afd69349bf51ebb82466ec0e7ce956ba622829fcbb9e62aadab712721ab641c82dce12e662d98b411
6
+ metadata.gz: a29d09df746a5d75d8ac812f68caa16544bf9ae3c774f1a6c9fa4802c0cccb1f0085de581c2e9e89249f275b8bc77515e3aa7adfcc6bcf6a824e6ba0444b50f8
7
+ data.tar.gz: ea0de41a5976d02531402b2525fe98ebf6c5c4e7be4e600f7acf63967fa320c512c3b6cf0513679526828498c59e4c510652ec0e745cfb7b3bc6717b054e1ec3
@@ -2,7 +2,7 @@ require 'pathname'
2
2
 
3
3
  module Xnlogic
4
4
  class CLI::Application
5
- attr_reader :options, :app_name, :thor, :name, :target
5
+ attr_reader :options, :app_name, :thor, :base_name, :name, :base, :app
6
6
 
7
7
  def initialize(options, app_name, thor)
8
8
  @options = options
@@ -10,7 +10,9 @@ module Xnlogic
10
10
  @thor = thor
11
11
 
12
12
  @name = app_name.chomp("/").tr('-', '_') # remove trailing slash if present
13
- @target = Pathname.pwd.join(name)
13
+ @base_name = options.fetch('base', 'xnlogic')
14
+ @base = Pathname.pwd.join(base_name)
15
+ @app = @base.join(name)
14
16
  end
15
17
 
16
18
  def run
@@ -27,6 +29,16 @@ module Xnlogic
27
29
  :email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
28
30
  }
29
31
 
32
+ base_templates = {
33
+ "Vagrantfile.tt" => "Vagrantfile",
34
+ "config/vagrant.provision.tt" => "config/vagrant.provision",
35
+ "config/vagrant.settings.yml.tt" => "config/vagrant.settings.yml",
36
+ }
37
+
38
+ base_templates.each do |src, dst|
39
+ thor.template("vagrant/#{src}", base.join(dst), opts)
40
+ end
41
+
30
42
  templates = {
31
43
  "gitignore.tt" => ".gitignore",
32
44
  ".rspec.tt" => ".rspec",
@@ -50,20 +62,16 @@ module Xnlogic
50
62
 
51
63
  "spec/spec_helper.rb.tt" => "spec/spec_helper.rb",
52
64
  "spec/gemname/gemname_spec.rb.tt" => "spec/#{namespaced_path}/#{name}_spec.rb",
53
-
54
- "Vagrantfile.tt" => "Vagrantfile",
55
- "config/vagrant.provision.tt" => "config/vagrant.provision",
56
- "config/vagrant.settings.yml.tt" => "config/vagrant.settings.yml",
57
65
  }
58
66
 
59
67
  templates.each do |src, dst|
60
- thor.template("application/#{src}", target.join(dst), opts)
68
+ thor.template("application/#{src}", app.join(dst), opts)
61
69
  end
62
70
 
63
71
  Xnlogic.ui.info "Creating Vagrant config."
64
72
  Xnlogic.ui.info ""
65
- Xnlogic.ui.info "Initializing git repo in #{target}"
66
- Dir.chdir(target) { `git init`; `git add .` }
73
+ Xnlogic.ui.info "Initializing git repo in #{app}"
74
+ Dir.chdir(app) { `git init`; `git add .` }
67
75
 
68
76
  Xnlogic.ui.info ""
69
77
  Xnlogic.ui.info "Please ensure that the following dependencies are installed on your computer"
@@ -73,7 +81,7 @@ module Xnlogic
73
81
  Xnlogic.ui.info ""
74
82
  Xnlogic.ui.info "Then run the following:"
75
83
  Xnlogic.ui.info ""
76
- Xnlogic.ui.info "cd #{name}"
84
+ Xnlogic.ui.info "cd #{base_name}"
77
85
  Xnlogic.ui.info "vagrant up"
78
86
  Xnlogic.ui.info "vagrant ssh"
79
87
  Xnlogic.ui.info ""
data/lib/xnlogic/cli.rb CHANGED
@@ -28,7 +28,6 @@ module Xnlogic
28
28
  stop_on_unknown_option! :exec
29
29
 
30
30
  class_option "no-color", :type => :boolean, :banner => "Disable colorization in output"
31
-
32
31
  class_option "verbose", :type => :boolean, :banner => "Enable verbose output mode", :aliases => "-V"
33
32
 
34
33
  def help(cli = nil)
@@ -36,13 +35,9 @@ module Xnlogic
36
35
  when nil then command = "xnlogic"
37
36
  else command = "xnlogic-#{cli}"
38
37
  end
39
-
40
- manpages = %w(
41
- xnlogic)
42
-
38
+ manpages = %w(xnlogic)
43
39
  if manpages.include?(command)
44
40
  root = File.expand_path("../man", __FILE__)
45
-
46
41
  if Xnlogic.which("man") && root !~ %r{^file:/.+!/META-INF/jruby.home/.+}
47
42
  Kernel.exec "man #{root}/#{command}"
48
43
  else
@@ -55,11 +50,12 @@ module Xnlogic
55
50
 
56
51
  def self.handle_no_command_error(command, has_namespace = $thor_runner)
57
52
  return super unless command_path = Xnlogic.which("xnlogic-#{command}")
58
-
59
53
  Kernel.exec(command_path, *ARGV[1..-1])
60
54
  end
61
55
 
62
- desc "application NAME [OPTIONS]", "Creates a skeleton for creating an XN Logic application"
56
+ desc "application NAME [OPTIONS]", "Creates a skeleton of an XN Logic application"
57
+ option "base", type: :string, default: 'xnlogic', banner:
58
+ "The project is structured ./base_directory/application_directory. Name the base_directory"
63
59
  def application(name)
64
60
  require 'xnlogic/cli/application'
65
61
  Application.new(options, name, self).run
@@ -13,8 +13,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
13
13
  vagrant_dir = File.expand_path(File.dirname(__FILE__))
14
14
 
15
15
  # Every Vagrant virtual environment requires a box to build off of.
16
- #config.vm.box = "hashicorp/precise64"
17
- config.vm.box = "ubuntu/trusty64"
16
+ config.vm.box = "box-cutter/ubuntu1404"
18
17
 
19
18
  # Create a forwarded port mapping which allows access to a specific port
20
19
  # within the machine from a port on the host machine. In the example below,
@@ -54,17 +53,24 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
54
53
  config.vbguest.no_remote = true
55
54
  end
56
55
 
56
+ # Include config from config/settings.yml
57
+ require 'yaml'
58
+ settings = YAML::load_file(vagrant_dir + "/config/vagrant.settings.yml")
59
+
57
60
  config.vm.provider "virtualbox" do |vb|
58
- # Don't boot with headless mode
61
+ # boot with headless mode
59
62
  vb.gui = false
60
-
61
- # Use VBoxManage to customize the VM. For example to change memory:
62
- vb.customize ["modifyvm", :id, "--memory", "2048"]
63
+ vb.customize ["modifyvm", :id, "--memory", settings['vm_memory']]
64
+ vb.customize ["modifyvm", :id, "--cpus", settings['vm_cpus']]
65
+ end
66
+
67
+ config.vm.provider "vmware_fusion" do |vmwf|
68
+ # boot with headless mode
69
+ vmwf.gui = false
70
+ vmwf.vmx["memsize"] = settings['vm_memory']
71
+ vmwf.vmx["numvcpus"] = settings['vm_cpus']
63
72
  end
64
73
 
65
- # Include config from config/vagrant.settings.yml
66
- require 'yaml'
67
- settings = YAML::load_file(vagrant_dir + "/config/vagrant.settings.yml")
68
74
  p1 = settings['jruby_version']
69
75
  p2 = settings['timezone']
70
76
  p3 = settings['XN_CLIENT']
@@ -0,0 +1,133 @@
1
+ #! /bin/bash
2
+
3
+ echo "Configuring XN VM. This process will take several minutes."
4
+
5
+ if [ -z "$1" ]; then echo "jruby_version not set" && exit 1; else echo "jruby_version is set to $1"; fi
6
+ if [ -z "$2" ]; then echo "timezone not set" && exit 1; fi
7
+ if [ -z "$3" ]; then echo "XN_CLIENT not set" && exit 1; else echo "XN_CLIENT is set to $3"; fi
8
+ if [ -z "$4" ]; then echo "DATOMIC_VERSION not set" && exit 1; fi
9
+
10
+ # variables
11
+ debug=
12
+ jruby_version=$1
13
+ timezone=$2
14
+
15
+ silent() {
16
+ if [[ $debug ]] ; then
17
+ "$@"
18
+ else
19
+ "$@" &>/dev/null
20
+ fi
21
+ }
22
+ hr() {
23
+ printf "%$(tput cols)s\n"|tr " " "-"
24
+ }
25
+
26
+ hr
27
+ echo "Configuring environment"
28
+ hr
29
+ export XN_CLIENT=$3
30
+ export DATOMIC_VERSION=$4
31
+ export DEBIAN_FRONTEND=noninteractive
32
+ export LANG=en_US.UTF-8
33
+ export LC_ALL=en_US.UTF-8
34
+ sudo locale-gen en_US.UTF-8
35
+ #sudo dpkg-reconfigure locales
36
+
37
+ hr
38
+ echo "Setting timezone:"
39
+ echo "$timezone" | sudo tee /etc/timezone
40
+ silent sudo dpkg-reconfigure --frontend noninteractive tzdata
41
+
42
+ hr
43
+ echo "Installing base packages"
44
+ silent sudo apt-get update
45
+ silent sudo apt-get install -y --force-yes software-properties-common python-software-properties
46
+ silent sudo apt-get install -y git curl wget vim maven node nodejs npm unzip zsh htop
47
+
48
+ hr
49
+ echo "Configuring shell"
50
+ silent git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || true
51
+ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
52
+ sudo chsh -s /usr/bin/zsh vagrant
53
+
54
+ hr
55
+ echo "Installing RVM"
56
+ echo progress-bar > ~/.curlrc
57
+ echo gem: --no-document > ~/.gemrc
58
+ silent gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
59
+ curl -sSL https://get.rvm.io | silent bash -s stable --auto-dotfiles
60
+ source $HOME/.rvm/scripts/rvm
61
+
62
+ hr
63
+ echo "Installing jRuby"
64
+ silent rvm mount -r https://s3.amazonaws.com/jruby.org/downloads/${jruby_version}/jruby-bin-${jruby_version}.tar.gz --verify-downloads 1
65
+ rvm use jruby-${jruby_version} --default
66
+ gem source -a https://rubygems.org
67
+ gem source -r http://rubygems.org/
68
+
69
+ hr
70
+ echo "Installing Java"
71
+ silent sudo add-apt-repository ppa:webupd8team/java
72
+ silent sudo apt-get update
73
+ echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
74
+ silent sudo apt-get install -yq oracle-java7-installer
75
+ silent sudo apt-get install -yq oracle-java7-set-default
76
+ sudo update-java-alternatives -s java-7-oracle
77
+
78
+ hr
79
+ echo "Updating PATH"
80
+ echo 'export PATH="$HOME/bin:~/xn.dev/cli-utils/bin:$PATH"' >> ~/.zshrc
81
+ export PATH="$HOME/bin:~/xn.dev/cli-utils/bin:$PATH"
82
+
83
+ hr
84
+ echo "Installing Lein"
85
+ cd $HOME
86
+ mkdir -p bin
87
+ cd bin
88
+ silent wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
89
+ chmod a+x $HOME/bin/lein
90
+
91
+ hr
92
+ echo "Installing Node deps"
93
+ hr
94
+ sudo npm install --loglevel silent -g jshint coffee-script jasmine-node issues
95
+
96
+ hr
97
+ echo "Installing Torquebox"
98
+ hr
99
+ gem install --quiet torquebox-server -v '3.1.1'
100
+
101
+ hr
102
+ echo "Installing XN gems"
103
+ hr
104
+ wget https://www.dropbox.com/s/7ujc7jp508uxews/pacer-mcfly-0.7.2.pre-java.gem\?dl\=1 -O pacer-mcfly-0.7.2.pre-java.gem --quiet
105
+ wget https://www.dropbox.com/s/jdo5yel0ya4cqv3/pacer-model-0.6.3.pre-java.gem?dl=1 -O pacer-model-0.6.3.pre-java.gem --quiet
106
+ gem install --quiet xnlogic pacer-mcfly-0.7.2.pre-java.gem pacer-model-0.6.3.pre-java.gem
107
+ rm pacer-mcfly-0.7.2.pre-java.gem pacer-model-0.6.3.pre-java.gem
108
+
109
+ hr
110
+ echo "Configuring XN"
111
+ mkdir -p /opt/xn_apps
112
+ cd
113
+ wget https://www.dropbox.com/s/1j4hyrzlfgra9gp/xn.dev.1.tbz -O $HOME/xn.dev.1.tbz --quiet
114
+ tar -xjf xn.dev.1.tbz
115
+ cd xn.dev
116
+ source script/setup_stack
117
+ cd fe/xn.js
118
+ npm install --loglevel silent
119
+ rake --quiet new_tb_version bundle_fe_server fresh_fe_config fe_server_db_init
120
+
121
+ hr
122
+ echo "Starting Datomic"
123
+ sudo cp $HOME/xn.dev/config/etc_init_datomic.conf /etc/init/datomic.conf
124
+ sudo initctl reload-configuration
125
+ sudo start datomic
126
+
127
+ hr
128
+ echo "Configuring <%= config[:name] %>"
129
+ cd /vagrant/<%= config[:name] %>
130
+ bundle
131
+ torquebox deploy
132
+ hr
133
+ echo "Done!"
@@ -4,4 +4,5 @@ XN_CLIENT: '<%= config[:name] %>'
4
4
  timezone: 'America/Toronto'
5
5
  jruby_version: '1.7.16'
6
6
  DATOMIC_VERSION: '0.9.4755'
7
-
7
+ vm_memory: '2048'
8
+ vm_cpus: '2'
@@ -1,3 +1,3 @@
1
1
  module Xnlogic
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,71 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xnlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darrick Wiebe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
- version_requirements: !ruby/object:Gem::Requirement
15
+ requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- requirement: !ruby/object:Gem::Requirement
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
21
23
  requirements:
22
- - - '>='
24
+ - - ">="
23
25
  - !ruby/object:Gem::Version
24
26
  version: '0'
25
- prerelease: false
26
- type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
- version_requirements: !ruby/object:Gem::Requirement
29
+ requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.7'
34
- requirement: !ruby/object:Gem::Requirement
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
35
37
  requirements:
36
- - - ~>
38
+ - - "~>"
37
39
  - !ruby/object:Gem::Version
38
40
  version: '1.7'
39
- prerelease: false
40
- type: :development
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
43
50
  version_requirements: !ruby/object:Gem::Requirement
44
51
  requirements:
45
- - - ~>
52
+ - - "~>"
46
53
  - !ruby/object:Gem::Version
47
54
  version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: ronn
48
57
  requirement: !ruby/object:Gem::Requirement
49
58
  requirements:
50
- - - ~>
59
+ - - "~>"
51
60
  - !ruby/object:Gem::Version
52
- version: '10.0'
53
- prerelease: false
61
+ version: 0.7.3
54
62
  type: :development
55
- - !ruby/object:Gem::Dependency
56
- name: xn_gem_release_tasks
63
+ prerelease: false
57
64
  version_requirements: !ruby/object:Gem::Requirement
58
65
  requirements:
59
- - - '>='
66
+ - - "~>"
60
67
  - !ruby/object:Gem::Version
61
- version: 0.1.8
68
+ version: 0.7.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: xn_gem_release_tasks
62
71
  requirement: !ruby/object:Gem::Requirement
63
72
  requirements:
64
- - - '>='
73
+ - - ">="
65
74
  - !ruby/object:Gem::Version
66
75
  version: 0.1.8
67
- prerelease: false
68
76
  type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.1.8
69
83
  description: Build graph applications with XN Logic.
70
84
  email:
71
85
  - dw@xnlogic.com
@@ -74,7 +88,7 @@ executables:
74
88
  extensions: []
75
89
  extra_rdoc_files: []
76
90
  files:
77
- - .gitignore
91
+ - ".gitignore"
78
92
  - Gemfile
79
93
  - README.md
80
94
  - Rakefile
@@ -83,13 +97,12 @@ files:
83
97
  - lib/xnlogic/cli.rb
84
98
  - lib/xnlogic/cli/application.rb
85
99
  - lib/xnlogic/friendly_errors.rb
100
+ - lib/xnlogic/man/xnlogic
101
+ - lib/xnlogic/man/xnlogic.txt
86
102
  - lib/xnlogic/templates/application/.rspec.tt
87
103
  - lib/xnlogic/templates/application/Gemfile.tt
88
104
  - lib/xnlogic/templates/application/Readme.md.tt
89
- - lib/xnlogic/templates/application/Vagrantfile.tt
90
105
  - lib/xnlogic/templates/application/config.ru.tt
91
- - lib/xnlogic/templates/application/config/vagrant.provision.tt
92
- - lib/xnlogic/templates/application/config/vagrant.settings.yml.tt
93
106
  - lib/xnlogic/templates/application/console.rb.tt
94
107
  - lib/xnlogic/templates/application/gitignore.tt
95
108
  - lib/xnlogic/templates/application/lib/fixtures/sample_fixtures.rb.tt
@@ -107,35 +120,36 @@ files:
107
120
  - lib/xnlogic/templates/application/spec/spec_helper.rb.tt
108
121
  - lib/xnlogic/templates/application/torquebox.yml.tt
109
122
  - lib/xnlogic/templates/application/torquebox_init.rb.tt
123
+ - lib/xnlogic/templates/vagrant/Vagrantfile.tt
124
+ - lib/xnlogic/templates/vagrant/config/vagrant.provision.tt
125
+ - lib/xnlogic/templates/vagrant/config/vagrant.settings.yml.tt
110
126
  - lib/xnlogic/ui.rb
111
127
  - lib/xnlogic/ui/shell.rb
112
128
  - lib/xnlogic/ui/silent.rb
113
129
  - lib/xnlogic/version.rb
114
130
  - man/xnlogic.ronn
115
131
  - xnlogic.gemspec
116
- - lib/xnlogic/man/xnlogic
117
- - lib/xnlogic/man/xnlogic.txt
118
132
  homepage: https://xnlogic.com
119
133
  licenses: []
120
134
  metadata: {}
121
- post_install_message:
135
+ post_install_message:
122
136
  rdoc_options: []
123
137
  require_paths:
124
138
  - lib
125
139
  required_ruby_version: !ruby/object:Gem::Requirement
126
140
  requirements:
127
- - - '>='
141
+ - - ">="
128
142
  - !ruby/object:Gem::Version
129
143
  version: '0'
130
144
  required_rubygems_version: !ruby/object:Gem::Requirement
131
145
  requirements:
132
- - - '>='
146
+ - - ">="
133
147
  - !ruby/object:Gem::Version
134
148
  version: '0'
135
149
  requirements: []
136
- rubyforge_project:
137
- rubygems_version: 2.1.9
138
- signing_key:
150
+ rubyforge_project:
151
+ rubygems_version: 2.2.2
152
+ signing_key:
139
153
  specification_version: 4
140
154
  summary: XN Logic command-line tools
141
155
  test_files: []
@@ -1,106 +0,0 @@
1
- #! /bin/bash
2
-
3
- if [ -z "$1" ]; then echo "jruby_version not set" && exit 1; else echo "jruby_version is set to $1"; fi
4
- if [ -z "$2" ]; then echo "timezone not set" && exit 1; else echo "timezone is set to $2"; fi
5
- if [ -z "$3" ]; then echo "XN_CLIENT not set" && exit 1; else echo "XN_CLIENT is set to $3"; fi
6
- if [ -z "$4" ]; then echo "DATOMIC_VERSION not set" && exit 1; else echo "DATOMIC_VERSION is set to $4"; fi
7
-
8
- # variables
9
- jruby_version=$1
10
- timezone=$2
11
-
12
- echo "Configuring environment"
13
- echo "________________________________________________________________________"
14
- export XN_CLIENT=$3
15
- export DATOMIC_VERSION=$4
16
- export DEBIAN_FRONTEND=noninteractive
17
- export LANG=en_US.UTF-8
18
- export LC_ALL=en_US.UTF-8
19
- sudo locale-gen en_US.UTF-8
20
- sudo dpkg-reconfigure locales
21
-
22
- echo "Setting timezone to $timezone"
23
- echo "________________________________________________________________________"
24
- echo "$timezone" | sudo tee /etc/timezone
25
- sudo dpkg-reconfigure --frontend noninteractive tzdata &> /dev/null
26
-
27
- echo "Installing base packages"
28
- echo "________________________________________________________________________"
29
- sudo apt-get update &> /dev/null
30
- sudo apt-get install -y --force-yes software-properties-common python-software-properties &> /dev/null
31
- sudo apt-get install -y git curl wget vim maven node nodejs npm unzip zsh htop &> /dev/null
32
-
33
- echo "Configuring shell"
34
- echo "________________________________________________________________________"
35
- git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh &> /dev/null
36
- cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
37
- sudo chsh -s /usr/bin/zsh vagrant
38
-
39
- echo "Installing RVM"
40
- echo "________________________________________________________________________"
41
- echo progress-bar > ~/.curlrc
42
- echo gem: --no-document > ~/.gemrc
43
- gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 &> /dev/null
44
- curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles &> /dev/null
45
- source $HOME/.rvm/scripts/rvm
46
-
47
- echo "Installing jRuby"
48
- echo "________________________________________________________________________"
49
- rvm mount -r https://s3.amazonaws.com/jruby.org/downloads/${jruby_version}/jruby-bin-${jruby_version}.tar.gz --verify-downloads 1 &> /dev/null
50
- rvm use jruby-${jruby_version} --default
51
- gem source -a https://rubygems.org
52
- gem source -r http://rubygems.org/
53
-
54
- echo "Installing Java"
55
- echo "________________________________________________________________________"
56
- sudo add-apt-repository ppa:webupd8team/java &> /dev/null
57
- sudo apt-get update &> /dev/null
58
- echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
59
- sudo apt-get install -yq oracle-java7-installer &> /dev/null
60
- sudo apt-get install -yq oracle-java7-set-default &> /dev/null
61
- sudo update-java-alternatives -s java-7-oracle
62
-
63
- echo "Updating PATH"
64
- echo "________________________________________________________________________"
65
- echo 'export PATH="$HOME/bin:~/xn.dev/cli-utils/bin:$PATH"' >> ~/.zshrc
66
- export PATH="$HOME/bin:~/xn.dev/cli-utils/bin:$PATH"
67
-
68
- echo "Installing Lein"
69
- echo "________________________________________________________________________"
70
- cd $HOME
71
- mkdir -p bin
72
- cd bin
73
- wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein &> /dev/null
74
- chmod a+x $HOME/bin/lein
75
-
76
- echo "Installing Node deps"
77
- echo "________________________________________________________________________"
78
- sudo npm install -g jshint coffee-script jasmine-node issues &> /dev/null
79
-
80
- echo "Installing Torquebox"
81
- echo "________________________________________________________________________"
82
- gem install torquebox-server -v '3.1.1'
83
-
84
- echo "Installing gems"
85
- echo "________________________________________________________________________"
86
- wget https://www.dropbox.com/s/7ujc7jp508uxews/pacer-mcfly-0.7.2.pre-java.gem\?dl\=1 -O pacer-mcfly-0.7.2.pre-java.gem --quiet
87
- wget https://www.dropbox.com/s/jdo5yel0ya4cqv3/pacer-model-0.6.3.pre-java.gem?dl=1 -O pacer-model-0.6.3.pre-java.gem --quiet
88
- gem install xnlogic pacer-mcfly-0.7.2.pre-java.gem pacer-model-0.6.3.pre-java.gem
89
- rm pacer-mcfly-0.7.2.pre-java.gem pacer-model-0.6.3.pre-java.gem
90
-
91
- echo "Configuring xn"
92
- echo "________________________________________________________________________"
93
- mkdir -p /opt/xn_apps
94
- cd
95
- wget https://www.dropbox.com/s/1j4hyrzlfgra9gp/xn.dev.1.tbz -O $HOME/xn.dev.1.tbz --quiet
96
- tar -xjf xn.dev.1.tbz
97
- cd xn.dev
98
- source script/setup_stack
99
- (cd fe/xn.js && npm install) &> /dev/null
100
- rake new_tb_version bundle_fe_server fresh_fe_config fe_server_db_init
101
-
102
- echo "Starting Datomic"
103
- echo "________________________________________________________________________"
104
- sudo cp $HOME/xn.dev/config/etc_init_datomic.conf /etc/init/datomic.conf
105
- sudo initctl reload-configuration
106
- sudo start datomic