osx_ruby_dev_install 0.9.0
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 +15 -0
- data/.gitignore +34 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +8 -0
- data/.idea/modules.xml +9 -0
- data/.idea/osx_ruby_dev_install.iml +139 -0
- data/.idea/osx_ruby_dev_installer.iml +35 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/.osx_install.json +20 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGES +5 -0
- data/Gemfile +21 -0
- data/Gemfile.lock +46 -0
- data/LICENSE +21 -0
- data/README.md +47 -0
- data/Rakefile +39 -0
- data/Thorfile +19 -0
- data/lib/osx_ruby_dev_install/generic_installer.rb +47 -0
- data/lib/osx_ruby_dev_install/osx_installer.rb +226 -0
- data/lib/osx_ruby_dev_install/osx_scripts.sh +249 -0
- data/lib/osx_ruby_dev_install/version.rb +3 -0
- data/lib/osx_ruby_dev_install.rb +1 -0
- data/osx_ruby_dev_install.gemspec.erb +21 -0
- data/spec/osx_installer_spec.rb +25 -0
- data/spec/spec_helper.rb +1 -0
- data/thor/osx_install.thor +145 -0
- metadata +156 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MGRmMjAzOWVlOGIyZWIwMzU4Y2JiZTg2MGMzY2Q2MTZmNzQ0NDg4Mw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OWY2Zjc0MDZmMzQ1ZjdlMGYzNzVhOTE5NmEzMWNiYmU1MGI2NGQ1OQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzQxYmFmMWY3YTZlNWM5N2IxMzZkNDdiODM4MDhiNzZkZjIzMThhOTQwY2Iw
|
10
|
+
MGE5YzZkZDI1OTYzODQzMzY3NWM1MTdhOWFlM2YwMWZiM2ZiNzQ5OGEwYjMx
|
11
|
+
MDQ1YTAzZTUxZmJmOWNlOWI0MjJkZjZmM2QxYzUxMmU0NWNmM2M=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NzA5ZDUxMjBjZjIwZjI5OWQ0ODFlMjQwZTk4NzkzNGQxZTIyMDAwMDIxMDQy
|
14
|
+
NGU3NWE2MzVjNjExMGRkYzlmNGY5YzFkNTRjYzRhN2M3YTY0MzQ2YTQ2ZTAx
|
15
|
+
NmMxODBhMjVmYTU4MTg3NWZiOWQ2ZGI4ZmYyNzk4MDQ5Y2FhMjE=
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
# Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="build" taksId="build" /><RakeTask description="" fullCmd="gen" taksId="gen" /><RakeTask description="" fullCmd="install" taksId="install" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeTask description="" fullCmd="uninstall" taksId="uninstall" /></RakeGroup></Settings>
|
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p545 [n1]" project-jdk-type="RUBY_SDK" />
|
4
|
+
<component name="SvnBranchConfigurationManager">
|
5
|
+
<option name="mySupportsUserInfoFilter" value="true" />
|
6
|
+
</component>
|
7
|
+
</project>
|
8
|
+
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/osx_ruby_dev_install.iml" filepath="$PROJECT_DIR$/.idea/osx_ruby_dev_install.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
9
|
+
|
@@ -0,0 +1,139 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<configuration default="false" name="OsxInstaller#init_launch_agent calls init_launch_agent method: osx_ruby_dev_install" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
5
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
6
|
+
<module name="osx_ruby_dev_install" />
|
7
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
8
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
9
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
10
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
11
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
12
|
+
<envs>
|
13
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
14
|
+
</envs>
|
15
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
16
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
17
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
18
|
+
<COVERAGE_PATTERN ENABLED="true">
|
19
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
20
|
+
</COVERAGE_PATTERN>
|
21
|
+
</EXTENSION>
|
22
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
23
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
24
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/osx_installer_spec.rb" />
|
25
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
26
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
27
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="OsxInstaller#init_launch_agent calls init_launch_agent method" />
|
28
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
29
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
30
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
31
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
32
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
33
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
34
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
35
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
36
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
37
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
38
|
+
<method />
|
39
|
+
</configuration>
|
40
|
+
<configuration default="false" name="OsxInstaller#homebrew_install calls homebrew_install method: osx_ruby_dev_install" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
41
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
42
|
+
<module name="osx_ruby_dev_install" />
|
43
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
44
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
45
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
46
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
47
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
48
|
+
<envs>
|
49
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
50
|
+
</envs>
|
51
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
52
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
53
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
54
|
+
<COVERAGE_PATTERN ENABLED="true">
|
55
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
56
|
+
</COVERAGE_PATTERN>
|
57
|
+
</EXTENSION>
|
58
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
59
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
60
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/osx_installer_spec.rb" />
|
61
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
62
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
63
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="OsxInstaller#homebrew_install calls homebrew_install method" />
|
64
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
65
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
66
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
67
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
68
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
69
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
70
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
71
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
72
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
73
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
74
|
+
<method />
|
75
|
+
</configuration>
|
76
|
+
<configuration default="false" name="OsxInstaller#init_launch_agent calls prepare method: osx_ruby_dev_install" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
77
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
78
|
+
<module name="osx_ruby_dev_install" />
|
79
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
80
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
81
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
82
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
83
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
84
|
+
<envs>
|
85
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
86
|
+
</envs>
|
87
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
88
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
89
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
90
|
+
<COVERAGE_PATTERN ENABLED="true">
|
91
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
92
|
+
</COVERAGE_PATTERN>
|
93
|
+
</EXTENSION>
|
94
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
95
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
96
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/osx_installer_spec.rb" />
|
97
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
98
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
99
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="OsxInstaller#init_launch_agent calls prepare method" />
|
100
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
101
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
102
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
103
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
104
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
105
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
106
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
107
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
108
|
+
<RunnerSettings RunnerId="RubyDebugRunner" />
|
109
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
110
|
+
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
111
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
112
|
+
<method />
|
113
|
+
</configuration>
|
114
|
+
</component>
|
115
|
+
<component name="NewModuleRootManager">
|
116
|
+
<content url="file://$MODULE_DIR$" />
|
117
|
+
<orderEntry type="jdk" jdkName="RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]" jdkType="RUBY_SDK" />
|
118
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
119
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.2, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
120
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
121
|
+
<orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.7, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
122
|
+
<orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
123
|
+
<orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.1.2, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
124
|
+
<orderEntry type="library" scope="PROVIDED" name="highline (v1.6.21, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
125
|
+
<orderEntry type="library" scope="PROVIDED" name="json_pure (v1.8.1, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
126
|
+
<orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.4, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
127
|
+
<orderEntry type="library" scope="PROVIDED" name="mocha (v1.1.0, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
128
|
+
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.9.1, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
129
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.0.0, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
130
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.0.0, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
131
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.0.0, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
132
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.0.0, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
133
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.0.0, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
134
|
+
<orderEntry type="library" scope="PROVIDED" name="script_executor (v1.3.8, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
135
|
+
<orderEntry type="library" scope="PROVIDED" name="text-interpolator (v1.1.4, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
136
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, RVM: ruby-1.9.3-p545 [osx_ruby_dev_install]) [gem]" level="application" />
|
137
|
+
</component>
|
138
|
+
</module>
|
139
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module version="4">
|
3
|
+
<component name="FacetManager">
|
4
|
+
<facet type="gem" name="Ruby Gem">
|
5
|
+
<configuration>
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$/../osx_ruby_dev_installer" />
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/../osx_ruby_dev_installer/lib" />
|
9
|
+
</configuration>
|
10
|
+
</facet>
|
11
|
+
</component>
|
12
|
+
<component name="NewModuleRootManager">
|
13
|
+
<content url="file://$MODULE_DIR$" />
|
14
|
+
<orderEntry type="jdk" jdkName="RVM: ruby-1.9.3-p545 [provisio]" jdkType="RUBY_SDK" />
|
15
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.0, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.7, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.1.2, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="highline (v1.6.21, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="json_pure (v1.8.1, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.4, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="mocha (v1.0.0, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.9.0, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.14.1, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.14.8, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.14.5, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.14.6, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="script_executor (v1.3.8, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="text-interpolator (v1.1.1, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, RVM: ruby-1.9.3-p545 [provisio]) [gem]" level="application" />
|
33
|
+
</component>
|
34
|
+
</module>
|
35
|
+
|
data/.idea/vcs.xml
ADDED
data/.osx_install.json
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"node": {
|
3
|
+
"domain": "127.0.0.1",
|
4
|
+
"user": "ENV['USER']",
|
5
|
+
"home": "ENV['HOME']",
|
6
|
+
"remote": false
|
7
|
+
},
|
8
|
+
|
9
|
+
"postgres": {
|
10
|
+
"hostname": "localhost", "user": "postgres", "password": "postgres",
|
11
|
+
|
12
|
+
"app_user": "ruby_dev_user",
|
13
|
+
"app_schemas": ["ruby_dev_test", "ruby_dev_dev", "ruby_dev_prod"]
|
14
|
+
},
|
15
|
+
|
16
|
+
"mysql": {
|
17
|
+
"hostname": "localhost", "user": "root", "password": "root"
|
18
|
+
}
|
19
|
+
|
20
|
+
}
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
osx_ruby_dev_install
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-1.9.3
|
data/CHANGES
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
group :default do
|
4
|
+
gem "text-interpolator", "~>1.0"
|
5
|
+
gem "script_executor", "~>1.3"
|
6
|
+
gem "thor", "~>0.19"
|
7
|
+
gem "json_pure", "~>1.8"
|
8
|
+
end
|
9
|
+
|
10
|
+
group :development do
|
11
|
+
gem "gemspec_deps_gen", "~>1.1"
|
12
|
+
gem "gemcutter", "~>0.7"
|
13
|
+
end
|
14
|
+
|
15
|
+
group :test do
|
16
|
+
gem "rspec"
|
17
|
+
gem "mocha"
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.2.5)
|
5
|
+
file_utils (1.0.7)
|
6
|
+
gemcutter (0.7.1)
|
7
|
+
gemspec_deps_gen (1.1.2)
|
8
|
+
bundler
|
9
|
+
file_utils
|
10
|
+
highline (1.6.21)
|
11
|
+
json_pure (1.8.1)
|
12
|
+
metaclass (0.0.4)
|
13
|
+
mocha (1.1.0)
|
14
|
+
metaclass (~> 0.0.1)
|
15
|
+
net-ssh (2.9.1)
|
16
|
+
rspec (3.0.0)
|
17
|
+
rspec-core (~> 3.0.0)
|
18
|
+
rspec-expectations (~> 3.0.0)
|
19
|
+
rspec-mocks (~> 3.0.0)
|
20
|
+
rspec-core (3.0.0)
|
21
|
+
rspec-support (~> 3.0.0)
|
22
|
+
rspec-expectations (3.0.0)
|
23
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
+
rspec-support (~> 3.0.0)
|
25
|
+
rspec-mocks (3.0.0)
|
26
|
+
rspec-support (~> 3.0.0)
|
27
|
+
rspec-support (3.0.0)
|
28
|
+
script_executor (1.3.8)
|
29
|
+
highline (~> 1.6)
|
30
|
+
net-ssh (~> 2.8)
|
31
|
+
text-interpolator (~> 1.0)
|
32
|
+
text-interpolator (1.1.4)
|
33
|
+
thor (0.19.1)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
gemcutter (~> 0.7)
|
40
|
+
gemspec_deps_gen (~> 1.1)
|
41
|
+
json_pure (~> 1.8)
|
42
|
+
mocha
|
43
|
+
rspec
|
44
|
+
script_executor (~> 1.3)
|
45
|
+
text-interpolator (~> 1.0)
|
46
|
+
thor (~> 0.19)
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Alexander Shvets
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
OSX Ruby Dev Installer
|
2
|
+
|
3
|
+
Library and thor tasks for provisioning of Macbook computer initial setup for Ruby/Rails development
|
4
|
+
|
5
|
+
Add this line to your application's Gemfile:
|
6
|
+
|
7
|
+
```bash
|
8
|
+
gem 'osx_ruby_dev_install'
|
9
|
+
```
|
10
|
+
And then execute:
|
11
|
+
|
12
|
+
```bash
|
13
|
+
bundle
|
14
|
+
```
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
```bash
|
19
|
+
gem install osx_ruby_dev_install
|
20
|
+
```
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Provisioning of initial computer setup is done as set of thor commands. You can execute them in one shot
|
25
|
+
or run each command separately.
|
26
|
+
|
27
|
+
* Execute all commands:
|
28
|
+
|
29
|
+
```bash
|
30
|
+
thor osx_install:all
|
31
|
+
```
|
32
|
+
or separately:
|
33
|
+
|
34
|
+
```bash
|
35
|
+
thor osx_install:brew
|
36
|
+
thor osx_install:rvm
|
37
|
+
thor osx_install:qtpostgres
|
38
|
+
thor osx_install:brew
|
39
|
+
```
|
40
|
+
|
41
|
+
## Contributing
|
42
|
+
|
43
|
+
1. Fork it
|
44
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
45
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
46
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
47
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.expand_path("lib", File.dirname(__FILE__))
|
4
|
+
|
5
|
+
require "rspec/core/rake_task"
|
6
|
+
require "osx_ruby_dev_install/version"
|
7
|
+
require "gemspec_deps_gen/gemspec_deps_gen"
|
8
|
+
|
9
|
+
version = OsxRubyDevInstall::VERSION
|
10
|
+
project_name = File.basename(Dir.pwd)
|
11
|
+
|
12
|
+
task :gen do
|
13
|
+
generator = GemspecDepsGen.new
|
14
|
+
|
15
|
+
generator.generate_dependencies "spec", "#{project_name}.gemspec.erb", "#{project_name}.gemspec"
|
16
|
+
end
|
17
|
+
|
18
|
+
task :build => :gen do
|
19
|
+
system "gem build #{project_name}.gemspec"
|
20
|
+
end
|
21
|
+
|
22
|
+
task :install do
|
23
|
+
system "gem install #{project_name}-#{version}.gem"
|
24
|
+
end
|
25
|
+
|
26
|
+
task :uninstall do
|
27
|
+
system "gem uninstall #{project_name}"
|
28
|
+
end
|
29
|
+
|
30
|
+
task :release => :build do
|
31
|
+
system "gem push #{project_name}-#{version}.gem"
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::RakeTask.new do |task|
|
35
|
+
task.pattern = 'spec/**/*_spec.rb'
|
36
|
+
task.verbose = false
|
37
|
+
end
|
38
|
+
|
39
|
+
|
data/Thorfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
unless defined? Thor::Runner
|
4
|
+
require 'bundler'
|
5
|
+
|
6
|
+
gems = Bundler::Definition.build(Bundler.default_gemfile, Bundler.default_lockfile, nil).requested_specs
|
7
|
+
|
8
|
+
gem = gems.find { |gem| gem.name == 'thor'}
|
9
|
+
|
10
|
+
load "#{ENV['GEM_HOME']}/gems/#{gem.name}-#{gem.version}/bin/thor"
|
11
|
+
end
|
12
|
+
|
13
|
+
require 'thor'
|
14
|
+
|
15
|
+
Dir.glob("thor/**/*.thor") do |name|
|
16
|
+
Thor::Util.load_thorfile(name)
|
17
|
+
end
|
18
|
+
|
19
|
+
# $LOAD_PATH.unshift File.expand_path("lib", File.dirname(__FILE__))
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'json'
|
2
|
+
require "highline"
|
3
|
+
|
4
|
+
require 'text_interpolator'
|
5
|
+
require 'script_executor/executable'
|
6
|
+
require 'script_executor/script_locator'
|
7
|
+
|
8
|
+
class GenericInstaller
|
9
|
+
include Executable, ScriptLocator
|
10
|
+
|
11
|
+
attr_reader :interpolator, :env, :script_list, :server_info
|
12
|
+
|
13
|
+
def initialize config_file_name, scripts_file_name
|
14
|
+
@interpolator = TextInterpolator.new
|
15
|
+
|
16
|
+
@env = read_config(config_file_name)
|
17
|
+
|
18
|
+
@script_list = scripts(File.expand_path(scripts_file_name, File.dirname(__FILE__)))
|
19
|
+
|
20
|
+
@server_info = env[:node] ? env[:node] : {}
|
21
|
+
end
|
22
|
+
|
23
|
+
protected
|
24
|
+
|
25
|
+
def read_config config_file_name
|
26
|
+
hash = JSON.parse(File.read(config_file_name), :symbolize_names => true)
|
27
|
+
|
28
|
+
interpolator.interpolate hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def terminal
|
32
|
+
@terminal ||= HighLine.new
|
33
|
+
end
|
34
|
+
|
35
|
+
def ask_password message
|
36
|
+
terminal.ask(message) { |q| q.echo = "*" }
|
37
|
+
end
|
38
|
+
|
39
|
+
def run server_info, script_name, params
|
40
|
+
execute(server_info) { evaluate_script_body(script_list[script_name], params, :string) }
|
41
|
+
end
|
42
|
+
|
43
|
+
def run_command server_info, command
|
44
|
+
execute(server_info.merge({script: command}))
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|