fontana_client_support 0.4.0 → 0.4.1
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,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZGNjOTk0MzVlNmY2OTA3NTE5ZDJjZDlhOTg0ZTE0YWZjNjcyNDk5MzIxMmVk
|
10
|
-
ZDJkZGViNzZjOWE1ODJlMTU1MjU0MzY1NjIzYjgxNjk4MTNlMjkwMjRmNzI1
|
11
|
-
NTcwOTlhYThlNjc5NWRkMmQwYjAyZmIwY2E5OTBmYTY3OWMzMDQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MzkwMzY1YjE3YmRhMDIwODM3ZDNjYTI1M2QzMjc3OTY4NTY5MTk5MjQ1MmM0
|
14
|
-
MjQ2Y2NhMjA3NjE4Y2VlY2NiZTZiZDk0MWQ3ZDAzM2Q0OTM5NzgwMjVmZjVm
|
15
|
-
MDI3N2FmMjMwMzk1N2E0ZjlhNDZiNjkwN2NjOTFmMGMxNDhmMjQ=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 49906ba658f2721bddcc19a66daf1b1dc3a0008f
|
4
|
+
data.tar.gz: 8471d5f7dfd5d7be4ea5b16e57f08e3330c85a44
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f06004dbb113bbcec556212815cfbcef3d6a1f310b2c0cf31666095f6f47bd7cb44651f20fa0066b561b97da12e0f82045780f238a1871c885aab5b7306db08d
|
7
|
+
data.tar.gz: 6ac36294c9f75bb744096a2f02408e6103d475c25f9262dd5fb2bb29c93ec712cd6f2815da1fc6fa7184e57067bb444864fab54a6f48879dddb73a59a6c92b67
|
data/lib/fontana/server_rake.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'fontana'
|
2
|
+
require 'fileutils'
|
2
3
|
|
3
4
|
module Fontana
|
4
5
|
module ServerRake
|
@@ -19,7 +20,7 @@ module Fontana
|
|
19
20
|
if Rake.application.options.trace
|
20
21
|
cmd << " --trace -v"
|
21
22
|
end
|
22
|
-
|
23
|
+
FileUtils::Verbose.chdir(Fontana.home) do
|
23
24
|
system!(cmd)
|
24
25
|
end
|
25
26
|
|
@@ -3,12 +3,16 @@ require 'fontana_client_support'
|
|
3
3
|
include Fontana::ServerRake
|
4
4
|
include Fontana::RakeUtils
|
5
5
|
|
6
|
+
require 'fileutils'
|
7
|
+
|
6
8
|
namespace :vendor do
|
7
9
|
namespace :fontana do
|
8
10
|
|
11
|
+
fileutils = FileUtils::Verbose
|
12
|
+
|
9
13
|
task :clear do
|
10
14
|
d = FontanaClientSupport.vendor_fontana
|
11
|
-
|
15
|
+
fileutils.rm_rf(d) if Dir.exist?(d)
|
12
16
|
end
|
13
17
|
|
14
18
|
# 動的に決まるタスクを静的に扱えるようにタスクを定義します
|
@@ -28,32 +32,32 @@ namespace :vendor do
|
|
28
32
|
|
29
33
|
task :clone do
|
30
34
|
raise "$FONTANA_REPO_URL is required" unless Fontana.repo_url
|
31
|
-
|
32
|
-
|
35
|
+
fileutils.mkdir_p(FontanaClientSupport.vendor_dir)
|
36
|
+
fileutils.chdir(FontanaClientSupport.root_dir) do
|
33
37
|
system!("git clone #{Fontana.repo_url} vendor/fontana")
|
34
38
|
end
|
35
|
-
|
39
|
+
fileutils.chdir(FontanaClientSupport.vendor_fontana) do
|
36
40
|
system!("git checkout #{Fontana.branch}")
|
37
41
|
end
|
38
42
|
end
|
39
43
|
|
40
44
|
task :configs do
|
41
|
-
|
45
|
+
fileutils.chdir(FontanaClientSupport.vendor_fontana) do
|
42
46
|
[
|
43
47
|
File.join(FontanaClientSupport.root_dir, "config/fontana_mongoid.yml"),
|
44
48
|
"config/mongoid.yml.example"
|
45
49
|
].each do |path|
|
46
50
|
if File.readable?(path)
|
47
|
-
|
51
|
+
fileutils.cp(path, "config/mongoid.yml")
|
48
52
|
break
|
49
53
|
end
|
50
54
|
end
|
51
|
-
|
55
|
+
fileutils.cp("config/project.yml.erb.example", "config/project.yml.erb")
|
52
56
|
end
|
53
57
|
end
|
54
58
|
|
55
59
|
task :bundle_install do
|
56
|
-
|
60
|
+
fileutils.chdir(FontanaClientSupport.vendor_fontana) do
|
57
61
|
system!("BUNDLE_GEMFILE=#{Fontana.gemfile} bundle install")
|
58
62
|
end
|
59
63
|
end
|
@@ -66,14 +70,14 @@ namespace :vendor do
|
|
66
70
|
]
|
67
71
|
|
68
72
|
task :fetch_and_checkout do
|
69
|
-
|
73
|
+
fileutils.chdir(FontanaClientSupport.vendor_fontana) do
|
70
74
|
system!("git fetch origin")
|
71
75
|
system!("git checkout origin/#{Fontana.branch}")
|
72
76
|
end
|
73
77
|
end
|
74
78
|
|
75
79
|
task :db_drop do
|
76
|
-
|
80
|
+
fileutils.chdir(FontanaClientSupport.vendor_fontana) do
|
77
81
|
system!("BUNDLE_GEMFILE=#{Fontana.gemfile} bundle exec rake db:drop")
|
78
82
|
end
|
79
83
|
end
|
@@ -15,7 +15,7 @@ module FontanaClientSupport
|
|
15
15
|
|
16
16
|
def current_branch_name
|
17
17
|
unless @current_branch_name
|
18
|
-
work = `git log --decorate -1`.scan(/^commit\s[0-9a-f]+\s\((.+)\)/).
|
18
|
+
work = `git log --decorate -1 --branches`.scan(/^commit\s[0-9a-f]+\s\((.+)\)/).
|
19
19
|
flatten.first.split(/,/).map(&:strip).reject{|s| s =~ /HEAD\Z/}
|
20
20
|
r = work.select{|s| s =~ /origin\//}.first
|
21
21
|
r ||= work.first
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fontana_client_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: gem to support development and testing with GSS/fontana
|
@@ -74,12 +74,12 @@ require_paths:
|
|
74
74
|
- lib
|
75
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - '>='
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- -
|
82
|
+
- - '>='
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|