daddy 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/daddy/formatter/daddy_html.rb +4 -4
- data/lib/daddy/formatter/menu.html.erb +1 -2
- data/lib/tasks/generate/controller.rake +0 -2
- data/lib/tasks/publish.rake +6 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07f46ca45e9a85190b5d6ce0717138db05aed390
|
4
|
+
data.tar.gz: 54ec45bf1cff99e654a5e153d9c50d6ff9c9bbaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39b3333f363be123447bf7122bc6cd73a67f05b86249df25962f66f9cc91e2b2dcd9c3dcd4aa68a3478f84458f767db8eec78c93c377595d7f0bbdc9e2be5c5e
|
7
|
+
data.tar.gz: f59575e2a410ecc40606bc7ba2e2ab25683c083d7bca05c9db2d2a5d71589100158f3b1e5e711ba904452df22a46dbbf38168cceff8275bb189a0d452ea3998e
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'erb'
|
2
|
+
|
1
3
|
module Daddy
|
2
4
|
module Formatter
|
3
5
|
module DaddyHtml
|
@@ -29,10 +31,8 @@ module Daddy
|
|
29
31
|
end
|
30
32
|
|
31
33
|
def make_menu_for_publish
|
32
|
-
|
33
|
-
|
34
|
-
system("erb -T - #{File.dirname(__FILE__)}/menu.html.erb > #{menu}")
|
35
|
-
File.read(menu)
|
34
|
+
template = File.join(File.dirname(__FILE__), 'menu.html.erb')
|
35
|
+
ERB.new(File.read(template), 0, '-').result
|
36
36
|
end
|
37
37
|
|
38
38
|
def feature_id
|
data/lib/tasks/publish.rake
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
# coding: UTF-8
|
2
|
-
|
3
1
|
require 'daddy/git'
|
4
2
|
require 'nokogiri'
|
5
3
|
|
6
4
|
namespace :dad do
|
7
5
|
task :publish do
|
8
|
-
fail('
|
6
|
+
fail('設定「cucumber.title」がありません。') unless Daddy.config.cucumber.title?
|
9
7
|
|
10
8
|
if File.exist?("db/schema.rb")
|
11
9
|
fail unless system('rake db:schema:load RAILS_ENV=test')
|
@@ -30,7 +28,7 @@ namespace :dad do
|
|
30
28
|
branch = git.current_branch
|
31
29
|
|
32
30
|
# 公開
|
33
|
-
base_dir = dad_publish_base_dir
|
31
|
+
base_dir = dad_publish_base_dir
|
34
32
|
system("sudo mkdir -p #{base_dir}")
|
35
33
|
system("sudo chown -R #{ENV['USER']}:#{ENV['USER']} #{base_dir}")
|
36
34
|
system("mkdir -p #{base_dir}/#{branch}")
|
@@ -97,10 +95,10 @@ def self.dad_publish_extract_features(dir)
|
|
97
95
|
ret
|
98
96
|
end
|
99
97
|
|
100
|
-
def self.dad_publish_base_dir
|
101
|
-
'/var/lib/daddy/' + dad_publish_title_to_dirname
|
98
|
+
def self.dad_publish_base_dir
|
99
|
+
'/var/lib/daddy/' + dad_publish_title_to_dirname
|
102
100
|
end
|
103
101
|
|
104
|
-
def self.dad_publish_title_to_dirname
|
105
|
-
title.sub(' ', '_').downcase
|
102
|
+
def self.dad_publish_title_to_dirname
|
103
|
+
Daddy.config.cucumber.title.sub(' ', '_').downcase
|
106
104
|
end
|