ro_support 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ro_support/log.rb +24 -24
- data/lib/ro_support/ro_guard.rb +20 -13
- data/lib/ro_support/version.rb +1 -1
- metadata +2 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 257bea16081e546928a459209384bb2438b464e8
|
4
|
+
data.tar.gz: 30c139fa9ef8d66a5b70452d49819235b769af39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd8c98bb26e1593e8c62547576f00b7cba7f3bd0f4f7e6522317d03abf963eab360f938caf0580f5361f4d42983eb319e9c737922a159d05677c858092965754
|
7
|
+
data.tar.gz: 31391888fd01491d42124fb97162e4b4a3b20d0b3e6f50ce4db22970323b807214371319291c4343b78f26879ab0b80ee7a27948ea7bcc790efa253ef70660e8
|
data/lib/ro_support/log.rb
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
require 'ro_logger'
|
2
|
-
|
3
|
-
module RoSupport
|
4
|
-
module Log
|
5
|
-
|
6
|
-
def puts_log(content, log_file='ro.log')
|
7
|
-
if content.is_a?(Exception)
|
8
|
-
puts ""
|
9
|
-
puts("#{err=content}")
|
10
|
-
err.backtrace.map do |line|
|
11
|
-
puts line
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
if defined?(Rails) && defined?(Rails.root)
|
16
|
-
log = Logger.new("#{Rails.root}/log/#{log_file}")
|
17
|
-
log.error(content)
|
18
|
-
else
|
19
|
-
log = Logger.new(File.join Dir.pwd, log_file)
|
20
|
-
log.error(content)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
1
|
+
#require 'ro_logger'
|
2
|
+
#
|
3
|
+
#module RoSupport
|
4
|
+
# module Log
|
5
|
+
#
|
6
|
+
# def puts_log(content, log_file='ro.log')
|
7
|
+
# if content.is_a?(Exception)
|
8
|
+
# puts ""
|
9
|
+
# puts("#{err=content}")
|
10
|
+
# err.backtrace.map do |line|
|
11
|
+
# puts line
|
12
|
+
# end
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# if defined?(Rails) && defined?(Rails.root)
|
16
|
+
# log = Logger.new("#{Rails.root}/log/#{log_file}")
|
17
|
+
# log.error(content)
|
18
|
+
# else
|
19
|
+
# log = Logger.new(File.join Dir.pwd, log_file)
|
20
|
+
# log.error(content)
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
# end
|
24
|
+
#end
|
data/lib/ro_support/ro_guard.rb
CHANGED
@@ -1,19 +1,9 @@
|
|
1
1
|
require "guard"
|
2
2
|
require "guard/guard"
|
3
|
+
require "active_support/concern"
|
3
4
|
|
4
|
-
module
|
5
|
-
|
6
|
-
|
7
|
-
def self.def_meth(meth, &blk)
|
8
|
-
define_singleton_method meth, &blk
|
9
|
-
define_method meth, &blk
|
10
|
-
Pry::Command.send :define_method, meth, &blk
|
11
|
-
end
|
12
|
-
|
13
|
-
def_meth "bash" do |*cmds|
|
14
|
-
Kernel.system cmds.flatten.join(" && ")
|
15
|
-
end
|
16
|
-
|
5
|
+
module RoSupport
|
6
|
+
module RoGuard
|
17
7
|
def start
|
18
8
|
commands = Pry::CommandSet.new do
|
19
9
|
block_command "install" do |*args|
|
@@ -52,5 +42,22 @@ module ::Guard
|
|
52
42
|
blk.call
|
53
43
|
end
|
54
44
|
end
|
45
|
+
|
46
|
+
extend ActiveSupport::Concern
|
47
|
+
|
48
|
+
included do
|
49
|
+
def_meth "bash" do |*cmds|
|
50
|
+
Kernel.system cmds.flatten.join(" && ")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
module ClassMethods
|
55
|
+
def def_meth(meth, &blk)
|
56
|
+
define_singleton_method meth, &blk
|
57
|
+
define_method meth, &blk
|
58
|
+
Pry::Command.send :define_method, meth, &blk
|
59
|
+
end
|
60
|
+
end
|
55
61
|
end
|
56
62
|
end
|
63
|
+
|
data/lib/ro_support/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ro_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.0.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: watir-rails
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rspec
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,34 +38,6 @@ dependencies:
|
|
52
38
|
- - '>='
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: headless
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - '>='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: nokogiri
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
41
|
- !ruby/object:Gem::Dependency
|
84
42
|
name: grit
|
85
43
|
requirement: !ruby/object:Gem::Requirement
|