rdoba 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 42b106c41e5273c7b2d1594996b557121eb37663
4
- data.tar.gz: 6eefdf94d3d1dbc3f1aaafa054a2ff2e46bf2bc9
5
- SHA512:
6
- metadata.gz: e9f284c473161858b14946754204530adae45f8f565716b03a192cb2a5c6ec0dbb319516effb2515e12766ae24a637491e06fae97cbb4824fb4a51327f9f5d30
7
- data.tar.gz: 5167bd2b03969c63fd0412a11e76c649c41702a67f5143184ca79c6f545196ab57401688248c52d4a0446a8a264fefbd84796dfefc74eafa42d3988afd5f78e7
1
+ ---
2
+ SHA1:
3
+ metadata.gz: de3915947273d92b53e9c92e437616e80e0c9c65
4
+ data.tar.gz: 872ef7f8461a8d8f68f7fb96d9def4a29a2e1cfd
5
+ SHA512:
6
+ metadata.gz: c87fdbd82c384dd768951fc3f15721d6f6f5655b349d05969e3d4788e368fc5224a221945031cf64524f6b2b96290d63548b96f04512c5ddeb9bf4df3900754a
7
+ data.tar.gz: 6019bb189d423e62551fc1e198ee84d4c4d7cc4ccc1fff8841c2696eb0b10309844f56ea77eec405aa81037ec654317dfe5b6b5597d95d66bade188c13b28c60
data/.gitignore CHANGED
@@ -15,8 +15,12 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ html/
18
19
  *.html
19
20
  *.swp
20
21
  *~
21
22
  .rvmrc
23
+ .ruby-version
24
+ .ruby-gemset
22
25
  .coveralls.yml
26
+ .tddium*
data/.travis.yml ADDED
@@ -0,0 +1,28 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2.3
7
+ - 2.3
8
+ - ruby-head
9
+ - rbx-2.1.1
10
+ - jruby-19mode
11
+ os:
12
+ - linux
13
+ - osx
14
+ env:
15
+ global:
16
+ - BUNDLE_JOBS=4
17
+ - CODECLIMATE_REPO_TOKEN=b163215f7a0d8f226c35ed665887fce7c8b90b0bfb18576af450b4a5fba8bb71
18
+ notifications:
19
+ flowdock: 0a77151ce94708b17cc767c93c794a61
20
+ matrix:
21
+ allow_failures:
22
+ - rvm: ruby-head
23
+ - rvm: ruby-2.3
24
+ - rvm: rbx-2.1.1
25
+ - rvm: jruby-19mode
26
+ - os: osx
27
+ before_install:
28
+ - 'gem install bundler --version "~> 1.5"'
data/CHANGES.md CHANGED
@@ -26,3 +26,9 @@ v0.1
26
26
  * re
27
27
  * strings
28
28
  * yaml
29
+
30
+ v0.9
31
+ + Added log module
32
+
33
+ v0.9.1
34
+ ! Some fixes did
data/Gemfile CHANGED
@@ -2,3 +2,8 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in rdoba.gemspec
4
4
  gemspec
5
+
6
+ group :development do
7
+ gem 'ffi', :github => 'majioa/ffi'
8
+ gem 'ffi-stat', :github => 'majioa/ffi-stat'
9
+ gem "codeclimate-test-reporter", :group => :test, :require => nil ; end
data/README.md CHANGED
@@ -1,14 +1,17 @@
1
1
  # Rdoba
2
- <!---
3
- ![Web Component Logo](http://??.tinypic.com/??.png)
4
- -->
5
- [![Gem Version](https://badge.fury.io/rb/rdoba.png)](http://rubygems.org/gems/rdoba)
6
- [![Build Status](https://travis-ci.org/3aHyga/rdoba.png?branch=master)](https://travis-ci.org/3aHyga/rdoba)
7
- [![Coverage Status](https://coveralls.io/repos/3aHyga/rdoba/badge.png)](https://coveralls.io/r/3aHyga/rdoba)
8
- [![Code Climate](https://codeclimate.com/github/3aHyga/rdoba.png)](https://codeclimate.com/github/3aHyga/rdoba)
9
- [![Endorse Count](http://api.coderwall.com/3aHyga/endorsecount.png)](http://coderwall.com/3aHyga)
10
2
 
11
- Rdoba, сирѣчь руби-добавокъ, есть библиотека, расширитяющая основныя классы Ruby такія какъ: Объектъ(Object), Ядро(Kernel), Строка(String), Словарь(Hash), Наборъ(Array), Пущь(NilClass) и т.д. Включаетъ модули и такія функціи:
3
+ ![Rdoba Logo](http://i44.tinypic.com/29fs129.png)
4
+
5
+ [![Dependency Status](https://gemnasium.com/majioa/rdoba.png)](https://gemnasium.com/majioa/rdoba)
6
+ [![Gem Version](https://badge.fury.io/rb/rdoba.png)](http://rubygems.org/gems/rdoba)
7
+ [![Build Status](https://travis-ci.org/majioa/rdoba.png?branch=master)](https://travis-ci.org/majioa/rdoba)
8
+ [![Coverage Status](https://coveralls.io/repos/majioa/rdoba/badge.png)](https://coveralls.io/r/majioa/rdoba)
9
+ [![Code Climate](https://codeclimate.com/github/majioa/rdoba.png)](https://codeclimate.com/github/majioa/rdoba)
10
+ [![MIT License](http://b.repl.ca/v1/License-MIT-blue.png)](LICENSE)
11
+ [![Download](http://b.repl.ca/v1/downloads-42.9K-green.png)](https://github.com/majioa/rdoba/archive/master.zip)
12
+ [![Solano Labs](https://api.tddium.com:443/majioa/rdoba/badges/41200.png?badge_token=ae032246866fa71a65ebf82a32e65992c6c8c1b7)](https://api.tddium.com:443/majioa/rdoba/suites/41200)
13
+
14
+ Rdoba, сирѣчь руби-добавокъ, есть библиотека, расширяющая основныя классы Ruby такія какъ: Объектъ(Object), Ядро(Kernel), Строка(String), Словарь(Hash), Наборъ(Array), Пущь(NilClass) и т.д. Включаетъ модули и такія функціи:
12
15
  * common - нѣкоторыя простыя методы къ Объекту, Ядру, Пущю, Набору, Строкѣ и Словрю;
13
16
  * a - чтеніе и запись значеній въ Наборъ и Словарь по индексу;
14
17
  * combinations - перечисленіе значеній Набора въ различномъ порядкѣ;
@@ -80,9 +83,9 @@ Rdoba, сирѣчь руби-добавокъ, есть библиотека, р
80
83
  # [[1], [2], [3]]
81
84
 
82
85
 
83
- ### Отладка приложенія
86
+ ### Гомон (log) приложенія
84
87
 
85
- Оладочныя функціи позволяютъ для выбранного класса выполнять заданныя куски кода или выводить на терминалъ опредѣлённый текстъ въ зависимости отъ уровня отладки.
88
+ Гомонские функціи позволяютъ для выбранного класса выполнять заданныя куски кода или выводить на терминалъ опредѣлённый текстъ въ зависимости отъ уровня гомона.
86
89
 
87
90
  require 'rdoba'
88
91
 
@@ -95,6 +98,13 @@ Rdoba, сирѣчь руби-добавокъ, есть библиотека, р
95
98
 
96
99
  A.new # » This is the Log
97
100
 
101
+ Поскольку функции гомона включены по-умолчанию, отключить гомон(log) можно с помощью установки переменной окружения в значение отличное от пустого, "1" или "true":
102
+
103
+ $ export RDOBA_LOG=0
104
+
105
+ или:
106
+
107
+ $ RDOBA_LOG=0 your/app/bin
98
108
 
99
109
  ### Методы бисера Rdoba
100
110
  #### Rdoba.os
@@ -137,10 +147,53 @@ Rdoba, сирѣчь руби-добавокъ, есть библиотека, р
137
147
  [ [ 'aa', 0, ],
138
148
  [ 'aa', 1 ] ].to_h # » {"aa"=>[0, 1]}
139
149
  [ [ 'aa', 0, ],
140
- [ 'aa', 0 ] ].to_h # » {"aa"=>[0, 1]}
150
+ [ 'aa', 0 ] ].to_h # » {"aa"=>[0, 0]}
141
151
  [ [ 'aa', 0, ],
142
152
  [ 'aa', 0 ] ].to_h( :save_unique => true ) # » {"aa"=>[0]}
143
153
 
154
+ ### Пречиненье пуздры (Change a case)
155
+
156
+ Переводъ строки въ верхнее значеніе. Функція можетъ принимать дополнительное значеніе 'FirstChar', которое принуждаетъ переводить не всю строку, а только первый знакъ. Переводъ знака въ нижнее значеніе. Функція можетъ принимать дополнительное значеніе 'FirstChar', которое принуждаетъ пе
157
+ реводить не всю строку, а только первый знакъ.
158
+
159
+ require 'rdoba'
160
+ rdoba :mixin => [ :case ]
161
+ a = 'строка'
162
+ a.upcase # => "СТРОКА"
163
+ a = 'строка'
164
+ a.upcase( :first_char ) # => "Строка"
165
+ a = 'СТРОКА'
166
+ a.downcase # => "строка"
167
+ a = 'СТРОКА'
168
+ a.downcase( :first_char ) # => "сТРОКА"
169
+
170
+ ### Обратка (reverse)
171
+
172
+ Обращаетъ строку. Допускается проводить обращеніе съ перемѣннымъ шагомъ, а также побайтно.
173
+
174
+ a = 'строка'
175
+
176
+ # обычное обращеніе
177
+ a.reverse # => "акортс"
178
+
179
+ # побайтное обращеніе
180
+ a.reverse(String::ByteByByte) # =>"\xB0\xD0\xBA\xD0\xBE\xD0\x80\xD1\x82\xD1\x81\xD1"
181
+
182
+ # обращеніе съ шагомъ 2
183
+ a.reverse(2) # => "карост"
184
+
185
+ ### Сравнена съ (compare_to)
186
+
187
+ Работаетъ такъ же какъ и '<=>', но можетъ принимать дополнительное значеніе ignore_diacritics, которое вынуждаетъ методъ проводить сравненіе отбрасывая надстрочники:
188
+
189
+ a = 'а҆́гнецъ'
190
+ b = 'а҆гкѵ́ра'
191
+
192
+ a <=> b # => -1
193
+ a.compare_to(b) # => -1
194
+ a.compare_to(b, :ignore_diacritics) # => 1
195
+ a.compare_to(b, :ignore_diacritics => true) # => 1
196
+
144
197
 
145
198
  ### Одвоеніе Словаря и Набора
146
199
 
@@ -321,89 +374,12 @@ Rdoba, сирѣчь руби-добавокъ, есть библиотека, р
321
374
 
322
375
  b.match a.to_re # => #<MatchData "строка.">
323
376
 
324
- ### Расширеніе строки
325
-
326
- Здѣ суть опредѣлены функціи, разширяющія возможности Строки кириллическими правилами, а также дополняющія Строку новыми возможностями.
327
-
328
- require 'rdoba/strings'
329
-
330
377
  #### Новыя методы класса
331
378
 
332
- ##### upcase
333
-
334
- Переводъ знака въ верхнее значеніе:
335
-
336
- a = 'ц'
337
- String.upcase(a) # => "Ц"
338
- a = 0x401 # 'ё'
339
- String.upcase(a) # => "Ё"
340
-
341
- ##### downcase
342
-
343
- Переводъ знака въ нижнее значеніе:
344
-
345
- a = 'Ц'
346
- String.downcase(a) # => "ц"
347
- a = 0x400 # 'Ё'
348
- String.downcase(a) # => "ё"
349
-
350
-
351
379
  #### Новыя методы экземпляра
352
380
 
353
- ##### upcase
354
-
355
- Переводъ строки въ верхнее значеніе. Функція можетъ принимать дополнительное значеніе 'FirstChar', которое принуждаетъ переводить не всю строку, а только первый знакъ.
356
-
357
- a = 'строка'
358
- a.upcase # => "СТРОКА"
359
- a = 'строка'
360
- a.upcase(String::FirstChar) # => "Строка"
361
-
362
- ##### downcase
363
-
364
- Переводъ знака въ нижнее значеніе. Функція можетъ принимать дополнительное значеніе 'FirstChar', которое принуждаетъ пе
365
- реводить не всю строку, а только первый знакъ.
366
-
367
- a = 'СТРОКА'
368
- a.downcase # => "строка"
369
- a = 'СТРОКА'
370
- a.downcase(String::FirstChar) # => "сТРОКА"
371
-
372
- ##### reverse
373
-
374
- Обращаетъ строку. Допускается проводить обращеніе съ перемѣннымъ шагомъ, а также побайтно.
375
-
376
- a = 'строка'
377
-
378
- # обычное обращеніе
379
- a.reverse # => "акортс"
380
-
381
- # побайтное обращеніе
382
- a.reverse(String::ByteByByte) # =>"\xB0\xD0\xBA\xD0\xBE\xD0\x80\xD1\x82\xD1\x81\xD1"
383
-
384
- # обращеніе съ шагомъ 2
385
- a.reverse(2) # => "карост"
386
-
387
- ##### compare_to
388
-
389
- Работаетъ такъ же какъ и '<=>', но можетъ принимать дополнительное значеніе ignore_diacritics, которое вынуждаетъ методъ проводить сравненіе отбрасывая надстрочники:
390
-
391
- a = 'а҆́гнецъ'
392
- b = 'а҆гкѵ́ра'
393
-
394
- a <=> b # => -1
395
- a.compare_to(b) # => -1
396
- a.compare_to(b, :ignore_diacritics) # => 1
397
- a.compare_to(b, :ignore_diacritics => true) # => 1
398
-
399
- #### Новыя методы для Fixnum
400
- ##### chr
401
-
402
- Возвращаетъ знакъ изъ числа, возпринимая его какъ кодъ.
403
-
404
- 1094.chr # => "ц"
405
-
406
381
  #### Новыя методы для ruby 1.8
382
+
407
383
  ##### ord
408
384
 
409
385
  Возвращаетъ числовой кодъ перваго знака строки:
@@ -445,3 +421,12 @@ Rdoba, сирѣчь руби-добавокъ, есть библиотека, р
445
421
  Авторскія и исключительныя права (а) 2011 Малъ Скрылевъ
446
422
  Зри LICENSE за подробностями.
447
423
 
424
+ # Хотите поддержать или поделиться денюжкою?
425
+ [![Endorse Count](http://api.coderwall.com/majioa/endorsecount.png)](http://coderwall.com/majioa)
426
+ [![Gittip donate button](http://img.shields.io/gittip/bevry.png)](http://gittip.com/majioa "Donate weekly to this project using Gittip")
427
+ [![Flattr donate button](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=majioa&url=https%3A%2F%2Fgithub.com%2Fmajioa%2Frdoba "Donate monthly to this project using Flattr")
428
+
429
+
430
+
431
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/majioa/rdoba/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
432
+
data/Rakefile CHANGED
@@ -1,58 +1,64 @@
1
- #!/usr/bin/env rake
1
+ require "bundler/gem_tasks"
2
+ require 'cucumber/rake/task'
3
+ require 'rdoc/task'
2
4
 
3
- desc "Prepare bundler"
4
- task :bundleup do
5
- sh 'gem install bundler --version "~> 1.3.1" --no-ri --no-rdoc'
6
- end
5
+ Cucumber::Rake::Task.new
7
6
 
8
- desc "Requires"
9
- task :req do
10
- $: << File.expand_path( '../lib', __FILE__ )
11
- require 'bundler/gem_helper'
7
+ #RDoc::Task.new do |rdoc|
8
+ # rdoc.main = "README.md"
9
+ # rdoc.rdoc_files.include( "README.md", "lib/**/*.rb" ) ; end
10
+ #
11
+ #desc "Prepare bundler"
12
+ #task :bundleup do
13
+ # sh 'gem install bundler --version "~> 1.5" --no-ri --no-rdoc'
14
+ #end
15
+ #
16
+ #desc "Requires"
17
+ #task :req do
18
+ # $: << File.expand_path( '../lib', __FILE__ )
19
+ # require 'bundler/gem_helper'
20
+ #
21
+ # Bundler::GemHelper.install_tasks
22
+ #end
23
+ #
24
+ #desc "Prepare bundle environment"
25
+ #task :up do
26
+ # sh 'bundle install'
27
+ #end
28
+ #
29
+ #desc "Distilled clean"
30
+ #task :distclean do
31
+ # sh 'git clean -fd'
32
+ # # sh 'cat .gitignore | while read mask; do rm -rf $(find -iname "$mask"); done'
33
+ #end
34
+ #
35
+ #desc "Generate gem"
36
+ #namespace :gem do
37
+ # task :build => [ :req ] do
38
+ # sh 'gem build rdoba.gemspec'
39
+ # end
40
+ #
41
+ # task :install do
42
+ # require File.expand_path( '../lib/rdoba/_version_', __FILE__ )
43
+ # sh "gem install rdoba-#{Rdoba::VERSION}.gem"
44
+ # end
45
+ #
46
+ # task :publish => [ :req ] do
47
+ # require File.expand_path( '../lib/rdoba/_version_', __FILE__ )
48
+ # sh "gem push rdoba-#{Rdoba::VERSION}.gem"
49
+ # sh "git tag v#{Rdoba::VERSION}"
50
+ # sh "git push"
51
+ # sh "git push --tag"
52
+ # end
53
+ #
54
+ # task :make => [ :build, :install, :publish ]
55
+ # task :default => :make
56
+ #end
57
+ #
58
+ #task(:default).clear
59
+ #task :default => :cucumber
60
+ #task :codeclimate => :cucumber
61
+ #task :all => [ :bundleup, :up, :cucumber, :'gem:make', :distclean ]
62
+ #task :build => [ :bundleup, :up, :cucumber, :rdoc,
63
+ # :'gem:build', :'gem:install', :distclean ]
12
64
 
13
- Bundler::GemHelper.install_tasks
14
- end
15
-
16
- desc "Prepare bundle environment"
17
- task :up do
18
- sh 'bundle install'
19
- end
20
-
21
- desc "Test with cucumber"
22
- task :test do
23
- sh 'cucumber features/log.feature features/bcd.feature'
24
- end
25
-
26
- desc "Distilled clean"
27
- task :distclean do
28
- sh 'git clean -fd'
29
- sh 'cat .gitignore | while read mask; do rm -rf $(find -iname "$mask"); done'
30
- end
31
-
32
- desc "Generate gem"
33
- namespace :gem do
34
- task :build => [ :req ] do
35
- sh 'gem build rdoba.gemspec'
36
- end
37
-
38
- task :install do
39
- require File.expand_path( '../lib/rdoba/_version_', __FILE__ )
40
- sh "gem install rdoba-#{Rdoba::VERSION}.gem"
41
- end
42
-
43
- task :publish => [ :req ] do
44
- require File.expand_path( '../lib/rdoba/_version_', __FILE__ )
45
- sh "git tag v#{Rdoba::VERSION}"
46
- sh "git push"
47
- sh "git push --tag"
48
- sh "gem push rdoba-#{Rdoba::VERSION}.gem"
49
- end
50
-
51
- task :make => [ :build, :install, :publish ]
52
- task :default => :make
53
- end
54
-
55
- task(:default).clear
56
- task :default => :test
57
- task :all => [ :bundleup, :up, :test, :'gem:make', :distclean ]
58
- task :build => [ :bundleup, :up, :test, :'gem:build', :'gem:install', :distclean ]
data/TODO ADDED
@@ -0,0 +1,6 @@
1
+ gem: log4r
2
+ gem: https://github.com/heroku/rails_stdout_logging
3
+ gen: https://github.com/lulalala/multi_logger
4
+
5
+ doc: http://guides.rubyonrails.org/v3.2.17/debugging_rails_applications.html
6
+ https://github.com/mbleigh/acts-as-taggable-on
data/features/log.feature CHANGED
@@ -30,13 +30,15 @@ Feature: Rdoba Log
30
30
  And look into stdout
31
31
  Then we see nothing
32
32
  When we look into stderr
33
- And see the no method error exception
33
+ Then see the name error exception
34
34
 
35
- When we issue an output of a variable using a keyword
35
+ When we apply Rdoba Log module with set a keyword for :as option
36
+ And issue an output of a variable using a keyword
36
37
  And look into stdout
37
38
  Then we see the variable output
38
39
 
39
- When we issue an output of a variable using an invalid keyword
40
+ When we apply Rdoba Log module with set a keyword for :as option
41
+ And we issue an output of a variable using an invalid keyword
40
42
  And look into stdout
41
43
  Then we see nothing
42
44
  When we look into stderr
@@ -48,71 +50,117 @@ Feature: Rdoba Log
48
50
  And look into stdout
49
51
  Then we see nothing
50
52
  When we look into stderr
51
- Then see the no method error exception
53
+ Then see the name error exception
52
54
 
53
- When issue a creation of the class
55
+ When declare the Cls class with debug lines
56
+ And apply Rdoba Log module with set Cls keyword for :in option
57
+ And issue a creation of the class
54
58
  And look into stdout
55
59
  Then we see the variable output
56
60
 
61
+ Scenario: Rdoba Log change embedding target with the :in keyword
62
+ Given applied Rdoba Log module inside a class
63
+ And issue an output of a variable inside an initializer using the keyword
64
+ And apply Rdoba Log module with set a keywords for :in option, and :as option pointing to self
65
+ And issue a creation of the class
66
+ Then look into stdout
67
+ And we see the variable output
68
+
69
+ # When apply Rdoba Log module with set a keyword for :as option inside a class
70
+ # And issue an output of a variable inside an initializer
71
+ # And apply Rdoba Log module with set a keywords for :in option, and :as option pointing to log
72
+ # And issue a creation of the class
73
+ # Then look into stdout
74
+ # And we see the variable output
75
+ #
76
+ When we apply Rdoba Log module inside a class
77
+ And issue an output of a variable
78
+ And look into stdout
79
+ Then we see the variable output
80
+
81
+ When we apply Rdoba Log module inside a class
82
+ And issue an output of a variable inside an initializer
83
+ And issue a creation of the class
84
+ And look into stdout
85
+ Then we see the variable output
86
+ When we look into stderr
87
+ Then we see nothing
88
+
57
89
  Scenario: Rdoba Log :functions option
58
90
  Given applied Rdoba Log module with set :extended keyword for :functions option
59
91
  When we issue an :extended output of a variable
60
92
  And look into stdout
61
93
  Then we see the variable output with the :extended notice
62
94
 
63
- When we remove :extended keyword out of :functions option
95
+ When we apply Rdoba Log module with set :extended keyword for :functions option
96
+ And remove :extended keyword out of :functions option
64
97
  And we issue an :extended output of a variable
65
98
  And look into stdout
66
99
  Then we see nothing
67
100
 
68
- When we issue an :enter output of a variable
101
+ When we apply Rdoba Log module with set :extended keyword for :functions option
102
+ And issue an :enter output of a variable
69
103
  And look into stdout
70
104
  Then we see nothing
71
- When we add :enter keyword out of :functions option
105
+
106
+ When we apply Rdoba Log module with set :extended keyword for :functions option
107
+ And add :enter keyword out of :functions option
72
108
  And we issue an :enter output of a variable
73
109
  And look into stdout
74
110
  Then we see the variable output with the :enter notice
75
111
 
76
- When we issue a :leave output of a variable
112
+ When we apply Rdoba Log module with set :extended keyword for :functions option
113
+ And issue a :leave output of a variable
77
114
  And look into stdout
78
115
  Then we see nothing
79
- When we add :leave keyword out of :functions option
116
+
117
+ When we apply Rdoba Log module with set :extended keyword for :functions option
118
+ And add :leave keyword out of :functions option
80
119
  And issue a :leave output of a variable
81
120
  And look into stdout
82
121
  Then we see the 'true' value output with the :leave notice
83
122
 
84
- When we issue an :info output of a variable
123
+ When we apply Rdoba Log module with set :extended keyword for :functions option
124
+ And issue an :info output of a variable
85
125
  And look into stdout
86
126
  Then we see nothing
87
- When we add :info keyword out of :functions option
127
+
128
+ When we apply Rdoba Log module with set :extended keyword for :functions option
129
+ And add :info keyword out of :functions option
88
130
  And we issue an :info output of a variable
89
131
  And look into stdout
90
132
  Then we see the variable output with the :info notice
91
133
 
92
- When we issue an :warn output of a variable
134
+ When we apply Rdoba Log module with set :extended keyword for :functions option
135
+ And issue an :warn output of a variable
93
136
  And look into stdout
94
137
  Then we see nothing
95
- When we add :warn keyword out of :functions option
138
+
139
+ When we apply Rdoba Log module with set :extended keyword for :functions option
140
+ And add :warn keyword out of :functions option
96
141
  And we issue an :warn output of a variable
97
142
  And look into stdout
98
143
  Then we see the variable output with the :warn notice
99
144
 
145
+ When we apply Rdoba Log module with set :extended keyword for :functions option
146
+ And clear the :functions option
147
+ And we issue an output of a variable
148
+ And look into stdout
149
+ Then we see nothing
150
+
151
+ Scenario: Rdoba Log backward compatibility
152
+ Given applied Rdoba Log module with set a keyword for :as option
100
153
  When we issue a :compat output of a variable
101
154
  And look into stdout
102
155
  Then we see nothing
103
156
  When we look into stderr
104
157
  Then see the no method error exception
105
158
 
106
- When we add :compat keyword out of :functions option
159
+ When we apply Rdoba Log module with set :compat keyword for :functions option, and :as option pointing to self
107
160
  And issue a :compat output of a variable
108
161
  And look into stdout
109
162
  Then we see the variable output
110
163
 
111
- When we clear the :functions option
112
- And we issue an output of a variable
113
- And look into stdout
114
- Then we see nothing
115
-
116
164
  Scenario: Rdoba Log :prefix option
117
165
  Given applied Rdoba Log module with set :timestamp keyword for :prefix option
118
166
  When we issue an output of a variable
@@ -134,6 +182,11 @@ Feature: Rdoba Log
134
182
  And look into stdout
135
183
  Then we see the variable output preficed with the :timestamp, :pid, :function_name, and :function_line
136
184
 
185
+ When we apply Rdoba Log module with set :timestamp, :pid, and :function keyword for :prefix option
186
+ And issue an output of a variable
187
+ And look into stdout
188
+ Then we see the variable output preficed with the :timestamp, :pid, and :function
189
+
137
190
  When we apply Rdoba Log module with set :timestamp, :pid, and :function_line keyword for :prefix option
138
191
  And issue an output of a variable
139
192
  And look into stdout
@@ -145,11 +198,13 @@ Feature: Rdoba Log
145
198
  And look into stdout
146
199
  Then we see the string output
147
200
 
148
- When we issue an output of a number
201
+ When we apply Rdoba Log module
202
+ And issue an output of a number
149
203
  And look into stdout
150
204
  Then we see the number output
151
205
 
152
- When we issue an output of an array
206
+ When we apply Rdoba Log module
207
+ And issue an output of an array
153
208
  And look into stdout
154
209
  Then we see the array output
155
210
 
@@ -159,17 +214,20 @@ Feature: Rdoba Log
159
214
  And look into stderr
160
215
  Then we see the exception info
161
216
 
162
- When we issue an output of the thrown exception to the stdout
217
+ When we apply Rdoba Log module
218
+ And issue an output of the thrown exception to the stdout
163
219
  And look into stderr
164
220
  Then we see nothing
165
221
  When we look into stdout
166
222
  Then we see the exception info
167
223
 
168
- When we issue an output of the thrown standard error
224
+ When we apply Rdoba Log module
225
+ And issue an output of the thrown standard error
169
226
  And look into stderr
170
227
  Then we see the standard error info
171
228
 
172
- When we issue an output of the thrown standard error with a notification
229
+ When we apply Rdoba Log module
230
+ And issue an output of the thrown standard error with a notification
173
231
  And look into stderr
174
232
  Then we see the standard error info with a notification
175
233
 
@@ -179,12 +237,14 @@ Feature: Rdoba Log
179
237
  And look into stdout
180
238
  Then we see the variable output
181
239
 
182
- When define an output of a variable inside an initializer
240
+ When we apply Rdoba Log module inside a class
241
+ And issue an output of a variable inside an initializer
183
242
  And issue a creation of the class
184
243
  And look into stdout
185
244
  Then we see the variable output
186
245
 
187
- When we define an output of a variable inside a singleton function
246
+ When we apply Rdoba Log module inside a class
247
+ And issue an output of a variable inside a singleton function
188
248
  And issue a call to the function
189
249
  And look into stdout
190
250
  Then we see the variable output
@@ -194,13 +254,24 @@ Feature: Rdoba Log
194
254
  And look into stdout
195
255
  Then we see the variable output
196
256
 
197
- When define an output of a variable inside an initializer using a keyword
257
+ When we apply Rdoba Log module with set a keyword for :as option inside a class
258
+ And issue an output of a variable inside an initializer using a keyword
198
259
  And issue a creation of the class
199
260
  And look into stdout
200
261
  Then we see the variable output
201
262
 
202
- When we define an output of a variable inside a singleton function using a keyword
263
+ When we apply Rdoba Log module with set a keyword for :as option inside a class
264
+ And issue an output of a variable inside a singleton function using a keyword
203
265
  And issue a call to the function
204
266
  And look into stdout
205
267
  Then we see the variable output
206
268
 
269
+ Scenario: Rdoba Log class full test plans run
270
+ Given selected full Rdoba Log test plan
271
+ When we run the test plan
272
+ Then we see no error on its output
273
+
274
+ Given selected full Rdoba Log test plan with self keyword
275
+ When we run the test plan
276
+ Then we see no error on its output
277
+