linux_provision 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+
3
+ require 'linux_provision/linux_provision'
4
+
5
+ describe LinuxProvision do
6
+ subject { LinuxProvision.new ".linux_provision.json", "linux_provision_scripts.sh"}
7
+
8
+ describe "#test" do
9
+ it "calls test method" do
10
+ subject.test
11
+ end
12
+ end
13
+ end
@@ -0,0 +1 @@
1
+ $: << File.expand_path('../lib', File.dirname(__FILE__))
@@ -0,0 +1,147 @@
1
+ $: << File.expand_path(File.dirname(__FILE__) + '/../lib')
2
+
3
+ require 'linux_provision/linux_provision'
4
+
5
+ class LinuxInstall < Thor
6
+ attr_reader :installer
7
+
8
+ def initialize *params
9
+ @installer = LinuxProvision.new ".linux_provision.json", "linux_provision_scripts.sh"
10
+
11
+ super *params
12
+ end
13
+
14
+ desc "test", "test"
15
+ def test
16
+ installer.test
17
+ end
18
+
19
+ desc "all", "Installs all required packages"
20
+ def all
21
+ invoke :prepare
22
+
23
+ invoke :rvm
24
+
25
+ invoke :ruby
26
+
27
+ invoke :git
28
+ invoke :node
29
+ invoke :jenkins
30
+ invoke :postgres
31
+ invoke :mysql
32
+
33
+ invoke :postgres_create_user
34
+ invoke :postgres_create_schemas
35
+
36
+ invoke :mysql_create_user
37
+ invoke :mysql_create_schemas
38
+
39
+ # invoke :selenium
40
+ end
41
+
42
+ desc "postgres_create", "Initializes postgres"
43
+ def postgres_create
44
+ invoke :postgres_create_user
45
+ invoke :postgres_create_schemas
46
+ end
47
+
48
+ desc "postgres_drop", "Drops postgres project schemas"
49
+ def postgres_drop
50
+ installer.postgres_drop env["app_user"], env["app_schemas"]
51
+ end
52
+
53
+ desc "mysql_create", "Initializes mysql"
54
+ def mysql_create
55
+ invoke :mysql_create_user
56
+ invoke :mysql_create_schemas
57
+ end
58
+
59
+ private
60
+
61
+ def method_missing(method, *args, &block)
62
+ installer.send(method, *args, &block)
63
+ end
64
+
65
+ # desc "prepare", "prepare"
66
+ # def prepare
67
+ # installer.prepare
68
+ # end
69
+
70
+ # desc "rvm", "Installs rvm"
71
+ # def rvm
72
+ # installer.rvm_install
73
+ # end
74
+
75
+ # desc "npm", "Installs npm"
76
+ # def npm
77
+ # installer.npm_install
78
+ # end
79
+
80
+ # desc "qt", "Installs qt"
81
+ # def qt
82
+ # installer.qt_install
83
+ # end
84
+
85
+ # desc "mysql", "Installs mysql server"
86
+ # def mysql
87
+ # installer.mysql_install
88
+ # end
89
+
90
+ # desc "mysql_restart", "Restarts mysql server"
91
+ # def mysql_restart
92
+ # installer.mysql_restart
93
+ # end
94
+ #
95
+ # desc "postgres", "Installs postgres server"
96
+ # def postgres
97
+ # installer.postgres_install
98
+ # end
99
+ #
100
+ # desc "postgres_restart", "Restarts postgres server"
101
+ # def postgres_restart
102
+ # installer.postgres_restart
103
+ # end
104
+ #
105
+ # desc "postgres_stop", "Stop postgres server"
106
+ # def postgres_stop
107
+ # installer.postgres_stop
108
+ # end
109
+ #
110
+ # desc "postgres_start", "Start postgres server"
111
+ # def postgres_start
112
+ # installer.postgres_start
113
+ # end
114
+ #
115
+ # desc "ruby", "Installs ruby"
116
+ # def ruby
117
+ # installer.ruby_install
118
+ # end
119
+ #
120
+ # desc "jenkins", "Installs jenkins server"
121
+ # def jenkins
122
+ # installer.jenkins_install
123
+ # end
124
+ #
125
+ # desc "jenkins_restart", "Restart jenkins server"
126
+ # def jenkins_restart
127
+ # installer.jenkins_restart
128
+ # end
129
+ #
130
+ # desc "selenium", "Installs selenium server"
131
+ # def selenium
132
+ # installer.selenium_install
133
+ # end
134
+ #
135
+ # desc "selenium_restart", "Restarts selenium server"
136
+ # def selenium_restart
137
+ # installer.selenium_restart
138
+ # end
139
+
140
+ #
141
+ # desc "postgres_test", "Test postgres schemas"
142
+ # def postgres_test
143
+ # installer.postgres_test env["app_user"]
144
+ # end
145
+ #
146
+
147
+ end
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: linux_provision
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.1
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Shvets
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: text-interpolator
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: script_executor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '0.19'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '0.19'
55
+ - !ruby/object:Gem::Dependency
56
+ name: json_pure
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.8'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.8'
69
+ - !ruby/object:Gem::Dependency
70
+ name: gemspec_deps_gen
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: gemcutter
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '0.7'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '0.7'
97
+ description: Library for building Linux computer provisioning
98
+ email: alexander.shvets@gmail.com
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - .gitignore
104
+ - .idea/.name
105
+ - .idea/.rakeTasks
106
+ - .idea/encodings.xml
107
+ - .idea/linux_provision.iml
108
+ - .idea/misc.xml
109
+ - .idea/modules.xml
110
+ - .idea/scopes/scope_settings.xml
111
+ - .idea/vcs.xml
112
+ - .linux_provision.json
113
+ - .ruby-gemset
114
+ - .ruby-version
115
+ - CHANGES
116
+ - Gemfile
117
+ - Gemfile.lock
118
+ - LICENSE
119
+ - README.md
120
+ - Rakefile
121
+ - Thorfile
122
+ - Vagrantfile
123
+ - lib/linux_provision.rb
124
+ - lib/linux_provision/generic_provision.rb
125
+ - lib/linux_provision/linux_provision.rb
126
+ - lib/linux_provision/linux_provision_scripts.sh
127
+ - lib/linux_provision/version.rb
128
+ - linux_provision.gemspec.erb
129
+ - spec/linux_install_spec.rb
130
+ - spec/linux_provision_spec.rb
131
+ - spec/spec_helper.rb
132
+ - thor/linux_install.thor
133
+ homepage: http://github.com/shvets/linux_provision
134
+ licenses: []
135
+ metadata: {}
136
+ post_install_message:
137
+ rdoc_options: []
138
+ require_paths:
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ! '>='
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ requirements: []
151
+ rubyforge_project:
152
+ rubygems_version: 2.2.2
153
+ signing_key:
154
+ specification_version: 4
155
+ summary: Library for building Linux computer provisioning
156
+ test_files:
157
+ - spec/linux_install_spec.rb
158
+ - spec/linux_provision_spec.rb
159
+ - spec/spec_helper.rb