rdoba 0.9.1 → 0.9.2

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.
Files changed (80) hide show
  1. checksums.yaml +7 -7
  2. data/.gitignore +4 -0
  3. data/.travis.yml +28 -0
  4. data/CHANGES.md +6 -0
  5. data/Gemfile +5 -0
  6. data/README.md +75 -90
  7. data/Rakefile +61 -55
  8. data/TODO +6 -0
  9. data/features/log.feature +100 -29
  10. data/features/mixin.feature +85 -0
  11. data/features/step_definitions/log_steps.rb +58 -22
  12. data/features/step_definitions/mixin_steps.rb +266 -0
  13. data/features/support/env.rb +48 -24
  14. data/features/support/fulltest_as_log.rb.in +143 -0
  15. data/features/support/fulltest_as_self.rb.in +144 -0
  16. data/features/support/mixin_support.rb +13 -0
  17. data/html/.keep +0 -0
  18. data/html/created.rid +28 -0
  19. data/html/css/fonts.css +167 -0
  20. data/html/css/rdoc.css +590 -0
  21. data/html/fonts/Lato-Light.ttf +0 -0
  22. data/html/fonts/Lato-LightItalic.ttf +0 -0
  23. data/html/fonts/Lato-Regular.ttf +0 -0
  24. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  25. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  26. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  27. data/html/images/add.png +0 -0
  28. data/html/images/arrow_up.png +0 -0
  29. data/html/images/brick.png +0 -0
  30. data/html/images/brick_link.png +0 -0
  31. data/html/images/bug.png +0 -0
  32. data/html/images/bullet_black.png +0 -0
  33. data/html/images/bullet_toggle_minus.png +0 -0
  34. data/html/images/bullet_toggle_plus.png +0 -0
  35. data/html/images/date.png +0 -0
  36. data/html/images/delete.png +0 -0
  37. data/html/images/find.png +0 -0
  38. data/html/images/loadingAnimation.gif +0 -0
  39. data/html/images/macFFBgHack.png +0 -0
  40. data/html/images/package.png +0 -0
  41. data/html/images/page_green.png +0 -0
  42. data/html/images/page_white_text.png +0 -0
  43. data/html/images/page_white_width.png +0 -0
  44. data/html/images/plugin.png +0 -0
  45. data/html/images/ruby.png +0 -0
  46. data/html/images/tag_blue.png +0 -0
  47. data/html/images/tag_green.png +0 -0
  48. data/html/images/transparent.png +0 -0
  49. data/html/images/wrench.png +0 -0
  50. data/html/images/wrench_orange.png +0 -0
  51. data/html/images/zoom.png +0 -0
  52. data/html/js/darkfish.js +161 -0
  53. data/html/js/jquery.js +4 -0
  54. data/html/js/navigation.js +142 -0
  55. data/html/js/navigation.js.gz +0 -0
  56. data/html/js/search.js +109 -0
  57. data/html/js/search_index.js +1 -0
  58. data/html/js/search_index.js.gz +0 -0
  59. data/html/js/searcher.js +228 -0
  60. data/html/js/searcher.js.gz +0 -0
  61. data/lib/rdoba/_version_.rb +1 -1
  62. data/lib/rdoba/common.rb +0 -15
  63. data/lib/rdoba/debug.rb +5 -1
  64. data/lib/rdoba/log.rb +360 -189
  65. data/lib/rdoba/merge.rb +21 -0
  66. data/lib/rdoba/mixin/time.rb +11 -0
  67. data/lib/rdoba/mixin/try.rb +6 -0
  68. data/lib/rdoba/mixin/try_1_9_0.rb +4 -0
  69. data/lib/rdoba/mixin/wait_if.rb +21 -0
  70. data/lib/rdoba/mixin.rb +270 -6
  71. data/lib/rdoba/strings.rb +4 -141
  72. data/lib/rdoba.rb +13 -19
  73. data/rdoba.gemspec +30 -24
  74. data/tddium.yml +11 -0
  75. metadata +260 -65
  76. data/features/bcd.feature +0 -29
  77. data/features/step_definitions/bcd_steps.rb +0 -69
  78. data/test/helper.rb +0 -18
  79. data/test/rdoba_test.rb.stub +0 -59
  80. data/test/test_rdoba.rb +0 -7
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rdoba'
4
+
5
+ p 'main=========='
6
+ rdoba :log => { :functions => [ :basic ], :prefix => [ :timestamp ] }
7
+ log > "11111"
8
+
9
+ def l
10
+ log > "22222"
11
+ end
12
+
13
+ l
14
+
15
+ #rdoba :log => { :functions => [ :basic ], :in => Object }
16
+
17
+ p 'Class=========='
18
+ class A
19
+ rdoba :log => { :functions => [ :basic ], :prefix => [ :timestamp ] }
20
+ log > "#{self} - When do I get executed!?"
21
+ class << self
22
+ log > "#{self} - And me!?" # now A's singleton class
23
+ def a # declaring method in class's singleton class results in class method
24
+ log > "#{self} - declared in singleton class" # it's A
25
+ end
26
+ end
27
+
28
+ def self.b
29
+ log > "#{self} - declared in class method" # self is class A again -> class method
30
+ class << self
31
+ log > "#{self} - declared in Class A's singleton class" # now it's Class A's singleton class
32
+ end
33
+ end
34
+
35
+ def c
36
+ log > "#{self} - declared in instance method" # self is instance of A
37
+ class << self
38
+ log > "#{self} - declared in instance's singleton class" # now it's the A instance's singleton class
39
+ end
40
+ end
41
+ end
42
+
43
+ a = A.new
44
+ A.a
45
+ A.b
46
+ a.c
47
+
48
+ p 'Class------------B'
49
+
50
+ class B
51
+ rdoba :log => { :functions => [ :basic ], :prefix => [ :pid ] }
52
+ log > "#{self} - When do I get executed!?"
53
+ class << self
54
+ log > "#{self} - And me!?" # now A's singleton class
55
+ def a # declaring method in class's singleton class results in class method
56
+ log > "#{self} - declared in singleton class" # it's A
57
+ end
58
+ end
59
+
60
+ def self.b
61
+ log > "#{self} - declared in class method" # self is class A again -> class method
62
+ class << self
63
+ log > "#{self} - declared in Class B's singleton class" # now it's Class A's singleton class
64
+ end
65
+ end
66
+
67
+ def c
68
+ log > "#{self} - declared in instance method" # self is instance of A
69
+ class << self
70
+ log > "#{self} - declared in instance's singleton class" # now it's the A instance's singleton class
71
+ end
72
+ end
73
+ end
74
+
75
+ a = B.new
76
+ B.a
77
+ B.b
78
+ a.c
79
+
80
+ p 'Class-------------A'
81
+ class A
82
+ log > "#{self} - When do I get executed!?"
83
+ class << self
84
+ log > "#{self} - And me!?" # now A's singleton class
85
+ def a # declaring method in class's singleton class results in class method
86
+ log > "#{self} - declared in singleton class" # it's A
87
+ end
88
+ end
89
+
90
+ def self.b
91
+ log > "#{self} - declared in class method" # self is class A again -> class method
92
+ class << self
93
+ log > "#{self} - declared in Class A's singleton class" # now it's Class A's singleton class
94
+ end
95
+ end
96
+
97
+ def c
98
+ # logi
99
+ log > "#{self} - declared in instance method" # self is instance of A
100
+ class << self
101
+ log > "#{self} - declared in instance's singleton class" # now it's the A instance's singleton class
102
+ end
103
+ end
104
+ end
105
+
106
+ a = A.new
107
+ A.a
108
+ A.b
109
+ a.c
110
+
111
+ p 'Module=========='
112
+ module M
113
+ rdoba :log => { :functions => [ :basic ], :prefix => [ :pid ] }
114
+ log > "aaa"
115
+
116
+ class << self
117
+ log > "#{self} - And me!?" # now A's singleton class
118
+ def a # declaring method in class's singleton class results in class method
119
+ log > "#{self} - declared in singleton class" # it's A
120
+ end
121
+ end
122
+
123
+ def a
124
+ log > 'mod a'
125
+ end
126
+
127
+ def self.b
128
+ log > 'mod b'
129
+ end
130
+ end
131
+
132
+ class C
133
+ include M
134
+ end
135
+ C.new.a
136
+
137
+ class D
138
+ extend M
139
+ end
140
+ D.a
141
+ M.b
142
+
143
+
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rdoba'
4
+
5
+ p 'main=========='
6
+ rdoba :log => { :as => :self, :functions => [ :basic ],
7
+ :prefix => [ :timestamp ] }
8
+ self > "11111"
9
+
10
+ def l
11
+ self > "22222"
12
+ end
13
+
14
+ l
15
+
16
+ rdoba :log => { :as => :self, :functions => [ :basic ], :in => Object }
17
+
18
+ p 'Class=========='
19
+ class A
20
+ rdoba :log => { :as => :self, :functions => [ :basic ],
21
+ :prefix => [ :timestamp ] }
22
+ self > "#{self} - When do I get executed!?"
23
+ class << self
24
+ self > "#{self} - And me!?" # now A's singleton class
25
+ def a # declaring method in class's singleton class results in class method
26
+ self > "#{self} - declared in singleton class" # it's A
27
+ end
28
+ end
29
+
30
+ def self.b
31
+ self > "#{self} - declared in class method" # self is class A again -> class method
32
+ class << self
33
+ self > "#{self} - declared in Class A's singleton class" # now it's Class A's singleton class
34
+ end
35
+ end
36
+
37
+ def c
38
+ self > "#{self} - declared in instance method" # self is instance of A
39
+ class << self
40
+ self > "#{self} - declared in instance's singleton class" # now it's the A instance's singleton class
41
+ end
42
+ end
43
+ end
44
+
45
+ a = A.new
46
+ A.a
47
+ A.b
48
+ a.c
49
+
50
+ p 'Class------------B'
51
+
52
+ class B
53
+ rdoba :log => { :as => :self, :functions => [ :basic ], :prefix => [ :pid ] }
54
+ self > "#{self} - When do I get executed!?"
55
+ class << self
56
+ self > "#{self} - And me!?" # now A's singleton class
57
+ def a # declaring method in class's singleton class results in class method
58
+ self > "#{self} - declared in singleton class" # it's A
59
+ end
60
+ end
61
+
62
+ def self.b
63
+ self > "#{self} - declared in class method" # self is class A again -> class method
64
+ class << self
65
+ self > "#{self} - declared in Class B's singleton class" # now it's Class A's singleton class
66
+ end
67
+ end
68
+
69
+ def c
70
+ self > "#{self} - declared in instance method" # self is instance of A
71
+ class << self
72
+ self > "#{self} - declared in instance's singleton class" # now it's the A instance's singleton class
73
+ end
74
+ end
75
+ end
76
+
77
+ a = B.new
78
+ B.a
79
+ B.b
80
+ a.c
81
+
82
+ p 'Class-------------A'
83
+ class A
84
+ self > "#{self} - When do I get executed!?"
85
+ class << self
86
+ self > "#{self} - And me!?" # now A's singleton class
87
+ def a # declaring method in class's singleton class results in class method
88
+ self > "#{self} - declared in singleton class" # it's A
89
+ end
90
+ end
91
+
92
+ def self.b
93
+ self > "#{self} - declared in class method" # self is class A again -> class method
94
+ class << self
95
+ self > "#{self} - declared in Class A's singleton class" # now it's Class A's singleton class
96
+ end
97
+ end
98
+
99
+ def c
100
+ self > "#{self} - declared in instance method" # self is instance of A
101
+ class << self
102
+ self > "#{self} - declared in instance's singleton class" # now it's the A instance's singleton class
103
+ end
104
+ end
105
+ end
106
+
107
+ a = A.new
108
+ A.a
109
+ A.b
110
+ a.c
111
+
112
+ p 'Module=========='
113
+ module M
114
+ rdoba :log => { :as => :self, :functions => [ :basic ], :prefix => [ :pid ] }
115
+ self > "aaa"
116
+
117
+ class << self
118
+ self > "#{self} - And me!?" # now A's singleton class
119
+ def a # declaring method in class's singleton class results in class method
120
+ self > "#{self} - declared in singleton class" # it's A
121
+ end
122
+ end
123
+
124
+ def a
125
+ self > 'mod a'
126
+ end
127
+
128
+ def self.b
129
+ self > 'mod b'
130
+ end
131
+ end
132
+
133
+ class C
134
+ include M
135
+ end
136
+ C.new.a
137
+
138
+ class D
139
+ extend M
140
+ end
141
+ D.a
142
+ M.b
143
+
144
+
@@ -0,0 +1,13 @@
1
+ module MixinSupport
2
+ def random_string count
3
+ Random.new.bytes( ( count + 1 ) / 2 ).split( '' ).map do |b|
4
+ b.ord.to_s( 16 )
5
+ end.join[ 0...count ] ; end
6
+
7
+ def tmpfile
8
+ filename = File.join( Dir.mktmpdir, random_string( 20 ) )
9
+ File.open( filename, 'w' ) do |f|
10
+ f.print( random_string( 20 ) ) ; end
11
+ filename ; end ; end
12
+
13
+ World(MixinSupport)
data/html/.keep ADDED
File without changes
data/html/created.rid ADDED
@@ -0,0 +1,28 @@
1
+ Tue, 13 Jun 2017 15:38:20 +0300
2
+ README.md Wed, 02 Sep 2015 12:31:51 +0300
3
+ lib/rdoba.rb Thu, 24 Jul 2014 17:01:48 +0400
4
+ lib/rdoba/_version_.rb Mon, 17 Aug 2015 23:25:50 +0300
5
+ lib/rdoba/a.rb Thu, 24 Jul 2014 17:01:48 +0400
6
+ lib/rdoba/bcd.rb Thu, 24 Jul 2014 17:01:48 +0400
7
+ lib/rdoba/combinations.rb Thu, 24 Jul 2014 17:01:48 +0400
8
+ lib/rdoba/common.rb Fri, 04 Sep 2015 14:20:32 +0300
9
+ lib/rdoba/debug.rb Thu, 24 Jul 2014 17:01:48 +0400
10
+ lib/rdoba/deploy.rb Thu, 24 Jul 2014 17:01:48 +0400
11
+ lib/rdoba/dup.rb Thu, 24 Jul 2014 17:01:48 +0400
12
+ lib/rdoba/fe.rb Thu, 24 Jul 2014 17:01:48 +0400
13
+ lib/rdoba/gem.rb Thu, 24 Jul 2014 17:01:48 +0400
14
+ lib/rdoba/hashorder.rb Thu, 24 Jul 2014 17:01:48 +0400
15
+ lib/rdoba/io.rb Thu, 24 Jul 2014 17:01:48 +0400
16
+ lib/rdoba/log.rb Mon, 14 Dec 2015 16:16:04 +0300
17
+ lib/rdoba/merge.rb Mon, 17 Aug 2015 23:25:54 +0300
18
+ lib/rdoba/mixin.rb Fri, 25 Mar 2016 14:12:45 +0300
19
+ lib/rdoba/mixin/time.rb Mon, 14 Sep 2015 14:15:08 +0300
20
+ lib/rdoba/mixin/try.rb Thu, 03 Sep 2015 17:01:48 +0300
21
+ lib/rdoba/mixin/try_1_9_0.rb Thu, 03 Sep 2015 17:02:01 +0300
22
+ lib/rdoba/mixin/wait_if.rb Tue, 08 Sep 2015 10:04:29 +0300
23
+ lib/rdoba/numeric.rb Thu, 24 Jul 2014 17:01:48 +0400
24
+ lib/rdoba/re.rb Thu, 24 Jul 2014 17:01:48 +0400
25
+ lib/rdoba/require.rb Thu, 24 Jul 2014 17:01:48 +0400
26
+ lib/rdoba/roman.rb Thu, 24 Jul 2014 17:01:48 +0400
27
+ lib/rdoba/strings.rb Thu, 24 Jul 2014 17:01:48 +0400
28
+ lib/rdoba/yaml.rb Thu, 24 Jul 2014 17:01:48 +0400
@@ -0,0 +1,167 @@
1
+ /*
2
+ * Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
3
+ * with Reserved Font Name "Source". All Rights Reserved. Source is a
4
+ * trademark of Adobe Systems Incorporated in the United States and/or other
5
+ * countries.
6
+ *
7
+ * This Font Software is licensed under the SIL Open Font License, Version
8
+ * 1.1.
9
+ *
10
+ * This license is copied below, and is also available with a FAQ at:
11
+ * http://scripts.sil.org/OFL
12
+ */
13
+
14
+ @font-face {
15
+ font-family: "Source Code Pro";
16
+ font-style: normal;
17
+ font-weight: 400;
18
+ src: local("Source Code Pro"),
19
+ local("SourceCodePro-Regular"),
20
+ url("fonts/SourceCodePro-Regular.ttf") format("truetype");
21
+ }
22
+
23
+ @font-face {
24
+ font-family: "Source Code Pro";
25
+ font-style: normal;
26
+ font-weight: 700;
27
+ src: local("Source Code Pro Bold"),
28
+ local("SourceCodePro-Bold"),
29
+ url("fonts/SourceCodePro-Bold.ttf") format("truetype");
30
+ }
31
+
32
+ /*
33
+ * Copyright (c) 2010, Łukasz Dziedzic (dziedzic@typoland.com),
34
+ * with Reserved Font Name Lato.
35
+ *
36
+ * This Font Software is licensed under the SIL Open Font License, Version
37
+ * 1.1.
38
+ *
39
+ * This license is copied below, and is also available with a FAQ at:
40
+ * http://scripts.sil.org/OFL
41
+ */
42
+
43
+ @font-face {
44
+ font-family: "Lato";
45
+ font-style: normal;
46
+ font-weight: 300;
47
+ src: local("Lato Light"),
48
+ local("Lato-Light"),
49
+ url("fonts/Lato-Light.ttf") format("truetype");
50
+ }
51
+
52
+ @font-face {
53
+ font-family: "Lato";
54
+ font-style: italic;
55
+ font-weight: 300;
56
+ src: local("Lato Light Italic"),
57
+ local("Lato-LightItalic"),
58
+ url("fonts/Lato-LightItalic.ttf") format("truetype");
59
+ }
60
+
61
+ @font-face {
62
+ font-family: "Lato";
63
+ font-style: normal;
64
+ font-weight: 700;
65
+ src: local("Lato Regular"),
66
+ local("Lato-Regular"),
67
+ url("fonts/Lato-Regular.ttf") format("truetype");
68
+ }
69
+
70
+ @font-face {
71
+ font-family: "Lato";
72
+ font-style: italic;
73
+ font-weight: 700;
74
+ src: local("Lato Italic"),
75
+ local("Lato-Italic"),
76
+ url("fonts/Lato-RegularItalic.ttf") format("truetype");
77
+ }
78
+
79
+ /*
80
+ * -----------------------------------------------------------
81
+ * SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
82
+ * -----------------------------------------------------------
83
+ *
84
+ * PREAMBLE
85
+ * The goals of the Open Font License (OFL) are to stimulate worldwide
86
+ * development of collaborative font projects, to support the font creation
87
+ * efforts of academic and linguistic communities, and to provide a free and
88
+ * open framework in which fonts may be shared and improved in partnership
89
+ * with others.
90
+ *
91
+ * The OFL allows the licensed fonts to be used, studied, modified and
92
+ * redistributed freely as long as they are not sold by themselves. The
93
+ * fonts, including any derivative works, can be bundled, embedded,
94
+ * redistributed and/or sold with any software provided that any reserved
95
+ * names are not used by derivative works. The fonts and derivatives,
96
+ * however, cannot be released under any other type of license. The
97
+ * requirement for fonts to remain under this license does not apply
98
+ * to any document created using the fonts or their derivatives.
99
+ *
100
+ * DEFINITIONS
101
+ * "Font Software" refers to the set of files released by the Copyright
102
+ * Holder(s) under this license and clearly marked as such. This may
103
+ * include source files, build scripts and documentation.
104
+ *
105
+ * "Reserved Font Name" refers to any names specified as such after the
106
+ * copyright statement(s).
107
+ *
108
+ * "Original Version" refers to the collection of Font Software components as
109
+ * distributed by the Copyright Holder(s).
110
+ *
111
+ * "Modified Version" refers to any derivative made by adding to, deleting,
112
+ * or substituting -- in part or in whole -- any of the components of the
113
+ * Original Version, by changing formats or by porting the Font Software to a
114
+ * new environment.
115
+ *
116
+ * "Author" refers to any designer, engineer, programmer, technical
117
+ * writer or other person who contributed to the Font Software.
118
+ *
119
+ * PERMISSION & CONDITIONS
120
+ * Permission is hereby granted, free of charge, to any person obtaining
121
+ * a copy of the Font Software, to use, study, copy, merge, embed, modify,
122
+ * redistribute, and sell modified and unmodified copies of the Font
123
+ * Software, subject to the following conditions:
124
+ *
125
+ * 1) Neither the Font Software nor any of its individual components,
126
+ * in Original or Modified Versions, may be sold by itself.
127
+ *
128
+ * 2) Original or Modified Versions of the Font Software may be bundled,
129
+ * redistributed and/or sold with any software, provided that each copy
130
+ * contains the above copyright notice and this license. These can be
131
+ * included either as stand-alone text files, human-readable headers or
132
+ * in the appropriate machine-readable metadata fields within text or
133
+ * binary files as long as those fields can be easily viewed by the user.
134
+ *
135
+ * 3) No Modified Version of the Font Software may use the Reserved Font
136
+ * Name(s) unless explicit written permission is granted by the corresponding
137
+ * Copyright Holder. This restriction only applies to the primary font name as
138
+ * presented to the users.
139
+ *
140
+ * 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
141
+ * Software shall not be used to promote, endorse or advertise any
142
+ * Modified Version, except to acknowledge the contribution(s) of the
143
+ * Copyright Holder(s) and the Author(s) or with their explicit written
144
+ * permission.
145
+ *
146
+ * 5) The Font Software, modified or unmodified, in part or in whole,
147
+ * must be distributed entirely under this license, and must not be
148
+ * distributed under any other license. The requirement for fonts to
149
+ * remain under this license does not apply to any document created
150
+ * using the Font Software.
151
+ *
152
+ * TERMINATION
153
+ * This license becomes null and void if any of the above conditions are
154
+ * not met.
155
+ *
156
+ * DISCLAIMER
157
+ * THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
158
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
159
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
160
+ * OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
161
+ * COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
162
+ * INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
163
+ * DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
164
+ * FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
165
+ * OTHER DEALINGS IN THE FONT SOFTWARE.
166
+ */
167
+