oop_rails_server 0.0.3 → 0.0.4
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/CHANGES.md +7 -0
- data/lib/oop_rails_server/rails_server.rb +23 -4
- data/lib/oop_rails_server/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 470c077aaf59850d09797e18c0d1e7455917ec0b
|
4
|
+
data.tar.gz: 25675945275cbba481e850543c11a4ef2e72e37d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4b977e4cbfa075d9ba7bdf31eb004ec9aa08030abab419a098f1ca9f4e74a9a869d487ef8d8a8c5729e605e85bde38ea8e5600de952766173f3dabeb8be0af2
|
7
|
+
data.tar.gz: 7130f8fac7d5fa7f09108440059c9229623a86c7a7550bd254f08873c8d155b5dc7e19db89edce2b6c4d62f3b403abf36e71a1f964581d062bc500883caa78e9
|
data/CHANGES.md
ADDED
@@ -41,7 +41,8 @@ module OopRailsServer
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def get(path, options = { })
|
44
|
-
get_response(path, options)
|
44
|
+
out = get_response(path, options)
|
45
|
+
out.body.strip if out
|
45
46
|
end
|
46
47
|
|
47
48
|
def uri_for(path)
|
@@ -52,12 +53,29 @@ module OopRailsServer
|
|
52
53
|
def get_response(path, options = { })
|
53
54
|
uri = uri_for(path)
|
54
55
|
data = Net::HTTP.get_response(uri)
|
55
|
-
|
56
|
-
|
56
|
+
|
57
|
+
if (data.code.to_s != '200')
|
58
|
+
if options[:ignore_status_code]
|
59
|
+
# ok, nothing
|
60
|
+
elsif options[:nil_on_not_found]
|
61
|
+
data = nil
|
62
|
+
else
|
63
|
+
raise "'#{uri}' returned #{data.code.inspect}, not 200; body was: #{data.body.strip}"
|
64
|
+
end
|
57
65
|
end
|
58
66
|
data
|
59
67
|
end
|
60
68
|
|
69
|
+
def run_command_in_rails_root!(command)
|
70
|
+
Bundler.with_clean_env do
|
71
|
+
with_rails_env do
|
72
|
+
in_rails_root do
|
73
|
+
safe_system("bundle exec #{command}")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
61
79
|
private
|
62
80
|
attr_reader :template_paths, :runtime_base_directory, :rails_env, :additional_gemfile_lines, :port, :server_pid
|
63
81
|
|
@@ -329,7 +347,8 @@ and output:
|
|
329
347
|
end
|
330
348
|
|
331
349
|
def is_remote_flag_required_error?(command_failed_error)
|
332
|
-
command_failed_error.output =~ /could\s+not\s+find.*in\s+the\s+gems\s+available\s+on\s+this\s+machine/i
|
350
|
+
command_failed_error.output =~ /could\s+not\s+find.*in\s+the\s+gems\s+available\s+on\s+this\s+machine/i ||
|
351
|
+
command_failed_error.output =~ /could\s+not\s+find.*in\s+any\s+of\s+the\s+sources/i
|
333
352
|
end
|
334
353
|
|
335
354
|
def do_bundle_install!(name, allow_remote)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oop_rails_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Geweke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -46,6 +46,7 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- ".gitignore"
|
49
|
+
- CHANGES.md
|
49
50
|
- Gemfile
|
50
51
|
- LICENSE.txt
|
51
52
|
- README.md
|