xnlogic 1.0.1 → 1.0.2

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: c8dd61a69bb55a8e1a3acf015ba717bb642e2059
4
- data.tar.gz: f9c542f8b5e89c86e3edad9497007e2cc4fa8c00
3
+ metadata.gz: f0322e021ba7a9c14d5d9843588dd6e41d622b96
4
+ data.tar.gz: cf6a99ce1e85b0f1bd382909ce8497c5a0f57cca
5
5
  SHA512:
6
- metadata.gz: adc560361f3e1c17485cc375d6b66b04d32907943cef6995fe121ad6339c70a2798175f2a1ff5e39f5a1d58ce3255dcbc42a4486466fffc575fede9e86c1a1cb
7
- data.tar.gz: 500670b16aaccd7362a50a604b5d7cc55cb95cdf37c51ca0fc814c301c80d4925bdee3bc3c58d8db6d787b17ab4884026a612deb9c14cec4b90da67fb7143dd0
6
+ metadata.gz: f33e4d16f59ed681039d6c488a615d0f2fa556a5c6aeb75994a6a940604a38df0d866a603f4911c4adaceee7eb5a287494877dbb59f3c4516e9898029cda2928
7
+ data.tar.gz: 4095c0df0530cfa5c8e0c64124a713ac5c9c707e8c0d4a3afd69349bf51ebb82466ec0e7ce956ba622829fcbb9e62aadab712721ab641c82dce12e662d98b411
@@ -50,14 +50,34 @@ module Xnlogic
50
50
 
51
51
  "spec/spec_helper.rb.tt" => "spec/spec_helper.rb",
52
52
  "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",
53
57
  }
54
58
 
55
59
  templates.each do |src, dst|
56
60
  thor.template("application/#{src}", target.join(dst), opts)
57
61
  end
58
62
 
63
+ Xnlogic.ui.info "Creating Vagrant config."
64
+ Xnlogic.ui.info ""
59
65
  Xnlogic.ui.info "Initializing git repo in #{target}"
60
66
  Dir.chdir(target) { `git init`; `git add .` }
67
+
68
+ Xnlogic.ui.info ""
69
+ Xnlogic.ui.info "Please ensure that the following dependencies are installed on your computer"
70
+ Xnlogic.ui.info "to continue."
71
+ Xnlogic.ui.info " - Vagrant: https://www.vagrantup.com/"
72
+ Xnlogic.ui.info " - VirtualBox: https://www.virtualbox.org/wiki/Downloads"
73
+ Xnlogic.ui.info ""
74
+ Xnlogic.ui.info "Then run the following:"
75
+ Xnlogic.ui.info ""
76
+ Xnlogic.ui.info "cd #{name}"
77
+ Xnlogic.ui.info "vagrant up"
78
+ Xnlogic.ui.info "vagrant ssh"
79
+ Xnlogic.ui.info ""
80
+ Xnlogic.ui.info "Once logged in to the server, the project directory is ~/xn.dev"
61
81
  end
62
82
  end
63
83
  end
@@ -0,0 +1,78 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5
+ VAGRANTFILE_API_VERSION = "2"
6
+
7
+ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8
+ # All Vagrant configuration is done here. The most common configuration
9
+ # options are documented and commented below. For a complete reference,
10
+ # please see the online documentation at vagrantup.com.
11
+
12
+ # Variable for current folder
13
+ vagrant_dir = File.expand_path(File.dirname(__FILE__))
14
+
15
+ # Every Vagrant virtual environment requires a box to build off of.
16
+ #config.vm.box = "hashicorp/precise64"
17
+ config.vm.box = "ubuntu/trusty64"
18
+
19
+ # Create a forwarded port mapping which allows access to a specific port
20
+ # within the machine from a port on the host machine. In the example below,
21
+ # accessing "localhost:8080" will access port 80 on the guest machine.
22
+ config.vm.network "forwarded_port", guest: 8080, host: 8080
23
+ config.vm.network "forwarded_port", guest: 3030, host: 3030
24
+ config.vm.network "forwarded_port", guest: 3031, host: 3031
25
+
26
+ # Create a private network, which allows host-only access to the machine
27
+ # using a specific IP.
28
+ config.vm.network "private_network", ip: "192.168.168.168"
29
+
30
+ # If true, then any SSH connections made will enable agent forwarding.
31
+ # Default value: false
32
+ config.ssh.forward_agent = true
33
+
34
+ # Set up NFS mount.
35
+ nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ || Vagrant.has_plugin?("vagrant-winnfsd")
36
+
37
+ # Setup auxiliary synced folder
38
+ config.vm.synced_folder vagrant_dir + "/xn_apps", "/opt/xn_apps", create: true, id: "xn-apps", :nfs => nfs_setting, :mount_options => ['nolock,vers=3,udp']
39
+ # config.vm.synced_folder "../data", "/vagrant_data"
40
+
41
+ # Allow caching to be used (see the vagrant-cachier plugin)
42
+ if Vagrant.has_plugin?("vagrant-cachier")
43
+ config.cache.synced_folder_opts = {
44
+ type: :nfs,
45
+ mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
46
+ }
47
+ config.cache.scope = :box
48
+ config.cache.auto_detect = true
49
+ end
50
+
51
+ # Manage vbguest update
52
+ if Vagrant.has_plugin?("vagrant-vbguest")
53
+ config.vbguest.auto_update = false
54
+ config.vbguest.no_remote = true
55
+ end
56
+
57
+ config.vm.provider "virtualbox" do |vb|
58
+ # Don't boot with headless mode
59
+ vb.gui = false
60
+
61
+ # Use VBoxManage to customize the VM. For example to change memory:
62
+ vb.customize ["modifyvm", :id, "--memory", "2048"]
63
+ end
64
+
65
+ # Include config from config/vagrant.settings.yml
66
+ require 'yaml'
67
+ settings = YAML::load_file(vagrant_dir + "/config/vagrant.settings.yml")
68
+ p1 = settings['jruby_version']
69
+ p2 = settings['timezone']
70
+ p3 = settings['XN_CLIENT']
71
+ p4 = settings['DATOMIC_VERSION']
72
+
73
+ config.vm.provision "shell" do |s|
74
+ s.path = "config/vagrant.provision"
75
+ s.args = [p1,p2,p3,p4]
76
+ s.privileged = false
77
+ end
78
+ end
@@ -0,0 +1,106 @@
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
@@ -0,0 +1,7 @@
1
+ ---
2
+
3
+ XN_CLIENT: '<%= config[:name] %>'
4
+ timezone: 'America/Toronto'
5
+ jruby_version: '1.7.16'
6
+ DATOMIC_VERSION: '0.9.4755'
7
+
@@ -1,3 +1,3 @@
1
1
  module Xnlogic
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,85 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xnlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darrick Wiebe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-28 00:00:00.000000000 Z
11
+ date: 2014-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
15
  version_requirements: !ruby/object:Gem::Requirement
23
16
  requirements:
24
- - - ">="
17
+ - - '>='
25
18
  - !ruby/object:Gem::Version
26
19
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
20
  requirement: !ruby/object:Gem::Requirement
30
21
  requirements:
31
- - - "~>"
22
+ - - '>='
32
23
  - !ruby/object:Gem::Version
33
- version: '1.7'
34
- type: :development
24
+ version: '0'
35
25
  prerelease: false
26
+ type: :runtime
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
36
29
  version_requirements: !ruby/object:Gem::Requirement
37
30
  requirements:
38
- - - "~>"
31
+ - - ~>
39
32
  - !ruby/object:Gem::Version
40
33
  version: '1.7'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
34
  requirement: !ruby/object:Gem::Requirement
44
35
  requirements:
45
- - - "~>"
36
+ - - ~>
46
37
  - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
38
+ version: '1.7'
49
39
  prerelease: false
40
+ type: :development
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
50
43
  version_requirements: !ruby/object:Gem::Requirement
51
44
  requirements:
52
- - - "~>"
45
+ - - ~>
53
46
  - !ruby/object:Gem::Version
54
47
  version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: ronn
57
48
  requirement: !ruby/object:Gem::Requirement
58
49
  requirements:
59
- - - "~>"
50
+ - - ~>
60
51
  - !ruby/object:Gem::Version
61
- version: 0.7.3
62
- type: :development
52
+ version: '10.0'
63
53
  prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.7.3
54
+ type: :development
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: xn_gem_release_tasks
71
- requirement: !ruby/object:Gem::Requirement
57
+ version_requirements: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ">="
59
+ - - '>='
74
60
  - !ruby/object:Gem::Version
75
61
  version: 0.1.8
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
62
+ requirement: !ruby/object:Gem::Requirement
79
63
  requirements:
80
- - - ">="
64
+ - - '>='
81
65
  - !ruby/object:Gem::Version
82
66
  version: 0.1.8
67
+ prerelease: false
68
+ type: :development
83
69
  description: Build graph applications with XN Logic.
84
70
  email:
85
71
  - dw@xnlogic.com
@@ -88,7 +74,7 @@ executables:
88
74
  extensions: []
89
75
  extra_rdoc_files: []
90
76
  files:
91
- - ".gitignore"
77
+ - .gitignore
92
78
  - Gemfile
93
79
  - README.md
94
80
  - Rakefile
@@ -97,12 +83,13 @@ files:
97
83
  - lib/xnlogic/cli.rb
98
84
  - lib/xnlogic/cli/application.rb
99
85
  - lib/xnlogic/friendly_errors.rb
100
- - lib/xnlogic/man/xnlogic
101
- - lib/xnlogic/man/xnlogic.txt
102
86
  - lib/xnlogic/templates/application/.rspec.tt
103
87
  - lib/xnlogic/templates/application/Gemfile.tt
104
88
  - lib/xnlogic/templates/application/Readme.md.tt
89
+ - lib/xnlogic/templates/application/Vagrantfile.tt
105
90
  - 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
106
93
  - lib/xnlogic/templates/application/console.rb.tt
107
94
  - lib/xnlogic/templates/application/gitignore.tt
108
95
  - lib/xnlogic/templates/application/lib/fixtures/sample_fixtures.rb.tt
@@ -126,27 +113,29 @@ files:
126
113
  - lib/xnlogic/version.rb
127
114
  - man/xnlogic.ronn
128
115
  - xnlogic.gemspec
116
+ - lib/xnlogic/man/xnlogic
117
+ - lib/xnlogic/man/xnlogic.txt
129
118
  homepage: https://xnlogic.com
130
119
  licenses: []
131
120
  metadata: {}
132
- post_install_message:
121
+ post_install_message:
133
122
  rdoc_options: []
134
123
  require_paths:
135
124
  - lib
136
125
  required_ruby_version: !ruby/object:Gem::Requirement
137
126
  requirements:
138
- - - ">="
127
+ - - '>='
139
128
  - !ruby/object:Gem::Version
140
129
  version: '0'
141
130
  required_rubygems_version: !ruby/object:Gem::Requirement
142
131
  requirements:
143
- - - ">="
132
+ - - '>='
144
133
  - !ruby/object:Gem::Version
145
134
  version: '0'
146
135
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.2.2
149
- signing_key:
136
+ rubyforge_project:
137
+ rubygems_version: 2.1.9
138
+ signing_key:
150
139
  specification_version: 4
151
140
  summary: XN Logic command-line tools
152
141
  test_files: []