aspector 0.13.1 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rubocop.yml +26 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +8 -11
  7. data/Changelog.md +59 -0
  8. data/Gemfile +9 -14
  9. data/Gemfile.lock +84 -50
  10. data/README.md +118 -0
  11. data/Rakefile +6 -22
  12. data/aspector.gemspec +15 -127
  13. data/benchmarks/after_benchmark.rb +28 -0
  14. data/benchmarks/around_advice_benchmark.rb +35 -0
  15. data/benchmarks/around_benchmark.rb +32 -0
  16. data/benchmarks/before_benchmark.rb +28 -0
  17. data/benchmarks/benchmark_helper.rb +17 -0
  18. data/benchmarks/combined_benchmark.rb +36 -0
  19. data/benchmarks/method_invocation_benchmark.rb +30 -0
  20. data/benchmarks/raw_benchmark.rb +39 -0
  21. data/examples/activerecord_hooks.rb +10 -15
  22. data/examples/around_example.rb +20 -31
  23. data/examples/aspector_apply_example.rb +10 -17
  24. data/examples/aspector_example.rb +7 -16
  25. data/examples/cache_aspect.rb +20 -30
  26. data/examples/design_by_contract.rb +20 -44
  27. data/examples/exception_handler.rb +12 -20
  28. data/examples/exception_handler2.rb +16 -24
  29. data/examples/implicit_method_option_test.rb +8 -16
  30. data/examples/interception_options_example.rb +71 -0
  31. data/examples/logging_aspect.rb +16 -24
  32. data/examples/process_aspector.rb +13 -0
  33. data/examples/retry_aspect.rb +20 -20
  34. data/lib/aspector.rb +17 -15
  35. data/lib/aspector/advice.rb +44 -57
  36. data/lib/aspector/advice_metadata.rb +10 -11
  37. data/lib/aspector/aspect_instances.rb +2 -3
  38. data/lib/aspector/base.rb +6 -368
  39. data/lib/aspector/base_class_methods.rb +24 -55
  40. data/lib/aspector/deferred_logic.rb +3 -4
  41. data/lib/aspector/deferred_option.rb +5 -10
  42. data/lib/aspector/interception.rb +356 -0
  43. data/lib/aspector/logger.rb +18 -45
  44. data/lib/aspector/logging.rb +10 -29
  45. data/lib/aspector/method_matcher.rb +5 -6
  46. data/lib/aspector/object_extension.rb +4 -12
  47. data/lib/aspector/version.rb +3 -0
  48. data/spec/examples_spec.rb +59 -0
  49. data/spec/functionals/aspect_for_multiple_targets_spec.rb +54 -0
  50. data/spec/functionals/aspect_interception_options_accessing_spec.rb +112 -0
  51. data/spec/functionals/aspect_on_a_class_spec.rb +159 -0
  52. data/spec/functionals/aspect_on_an_instance_spec.rb +66 -0
  53. data/spec/functionals/aspector_spec.rb +138 -0
  54. data/spec/functionals/aspects_combined_spec.rb +37 -0
  55. data/spec/functionals/aspects_execution_order_spec.rb +61 -0
  56. data/spec/functionals/aspects_on_private_methods_spec.rb +82 -0
  57. data/spec/spec_helper.rb +20 -21
  58. data/spec/support/class_builder.rb +44 -0
  59. data/spec/units/advice_spec.rb +49 -0
  60. data/spec/units/advices/after_spec.rb +328 -0
  61. data/spec/units/advices/around_spec.rb +336 -0
  62. data/spec/units/advices/before_filter_spec.rb +287 -0
  63. data/spec/units/advices/before_spec.rb +237 -0
  64. data/spec/units/advices/raw_spec.rb +67 -0
  65. data/spec/units/base_class_methods_spec.rb +262 -0
  66. data/spec/units/base_spec.rb +133 -0
  67. data/spec/units/deferred_logic_spec.rb +35 -0
  68. data/spec/units/logger_spec.rb +20 -0
  69. data/spec/units/logging_spec.rb +85 -0
  70. data/spec/units/method_matcher_spec.rb +95 -0
  71. data/spec/units/object_extension_spec.rb +11 -0
  72. data/spec/units/special_chars_spec.rb +128 -0
  73. metadata +98 -246
  74. data/.document +0 -5
  75. data/.rvmrc +0 -8
  76. data/README.rdoc +0 -80
  77. data/VERSION +0 -1
  78. data/performance-tests/after_test.rb +0 -25
  79. data/performance-tests/around_advice_benchmark.rb +0 -66
  80. data/performance-tests/around_test.rb +0 -27
  81. data/performance-tests/before_test.rb +0 -25
  82. data/performance-tests/combined_test.rb +0 -33
  83. data/performance-tests/method_invocation_test.rb +0 -25
  84. data/performance-tests/raw_test.rb +0 -37
  85. data/performance-tests/test_helper.rb +0 -9
  86. data/run_all_examples.sh +0 -12
  87. data/spec/functional/advices_on_private_methods_spec.rb +0 -21
  88. data/spec/functional/aspect_on_eigen_class_spec.rb +0 -72
  89. data/spec/functional/aspect_on_object_spec.rb +0 -20
  90. data/spec/functional/aspector_spec.rb +0 -140
  91. data/spec/functional/aspects_combined_spec.rb +0 -48
  92. data/spec/functional/execution_order_spec.rb +0 -42
  93. data/spec/unit/advice_spec.rb +0 -4
  94. data/spec/unit/after_spec.rb +0 -88
  95. data/spec/unit/around_spec.rb +0 -76
  96. data/spec/unit/base_class_methods_spec.rb +0 -28
  97. data/spec/unit/base_spec.rb +0 -112
  98. data/spec/unit/before_spec.rb +0 -125
  99. data/spec/unit/deferred_logic_spec.rb +0 -23
  100. data/spec/unit/method_matcher_spec.rb +0 -43
  101. data/spec/unit/raw_spec.rb +0 -53
  102. data/spec/unit/special_chars_spec.rb +0 -122
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 875a24ec8871a619beaff9400d10a24882cc5341
4
+ data.tar.gz: 4f6309f8ad1ce4ee9899f5dcf581650c8e87a132
5
+ SHA512:
6
+ metadata.gz: 4ddbbc122722076f9a27bc6e96f68ac83d75a1cd873f39c86c65fef0c5c448d29b638e0477330ed73e5714b920b44268df541d517350b382d9181ff09bd60dad
7
+ data.tar.gz: 1168aca86c936638963416f44e06834b0916242037634196483ee3fd37842feb7720e2ba68c85b5616c9926c9838c86271b7700c3c47f12c89017108d98bb0ae
@@ -0,0 +1,14 @@
1
+ .idea
2
+ performance-tests/output
3
+ coverage
4
+ rdoc
5
+ doc
6
+ .yardoc
7
+ .bundle
8
+ pkg
9
+ .svn
10
+ .DS_Store
11
+ *.tmproj
12
+ *.swp
13
+ .redcar
14
+ .rbx
@@ -0,0 +1,26 @@
1
+ AlignParameters:
2
+ Enabled: false
3
+ ClassLength:
4
+ CountComments: false
5
+ Max: 200
6
+ LineLength:
7
+ Max: 99
8
+ MethodLength:
9
+ CountComments: false
10
+ Max: 15
11
+ Metrics/AbcSize:
12
+ Max: 25
13
+ AllCops:
14
+ Exclude:
15
+ - bin/**/*
16
+ - /.gemspec/
17
+ - !ruby/regexp /old_and_unused\.rb$/
18
+ - lib/**/*
19
+ Include:
20
+ - Rakefile
21
+ - aspector.gemspec
22
+ Style/MultilineOperationIndentation:
23
+ EnforcedStyle: indented
24
+ SupportedStyles:
25
+ - aligned
26
+ - indented
@@ -0,0 +1 @@
1
+ aspector
@@ -0,0 +1 @@
1
+ ruby-2.2.2
@@ -1,13 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
- - 1.9.2
5
- - 1.9.3
6
- - jruby-18mode # JRuby in 1.8 mode
7
- - jruby-19mode # JRuby in 1.9 mode
8
- #- rbx-18mode
9
- #- rbx-19mode
10
- # uncomment this line if your project needs to run something other than `rake`:
11
- script: bundle exec rspec spec
12
- #gemfile: Gemfile.travis
13
-
3
+ - 2.0.0
4
+ - 2.1.5
5
+ - 2.2.2
6
+ script:
7
+ - bundle exec rubocop spec
8
+ - bundle exec rubocop examples
9
+ - bundle exec rubocop benchmarks
10
+ - bundle exec rspec spec
@@ -0,0 +1,59 @@
1
+ # Aspector
2
+
3
+ ## Changelog
4
+
5
+ ### 0.15.0
6
+
7
+ * Created instance of an aspect can be applied to multiple targets(classes/instances)
8
+ * aspect_arg replaced with interception_arg because of multiple possible targets with different options
9
+ * aspect_arg no longer works - accessing aspect can be done via interception (interception.aspect)
10
+ * Interception options inherit all the default aspect options + options per interception
11
+ * Specs for interception_arg
12
+ * Specs for accessing interception options
13
+ * Specs that validate if interception options inherit aspect default options
14
+ * Logger proc printing instead of evaluating fix
15
+
16
+ ### 0.14.0
17
+
18
+ * jruby support drop - there's no 2.0 syntax for jruby yet. Once it's out of beta - no further work needs to be done (works for me on beta)
19
+ * drop 1.8 and 1.9 - even ruby guys recommend upgrading
20
+ * added rubocop for spec/, examples/ and benchmarks/
21
+ * fixed examples issues (they were not working anymore)
22
+ * fixed benchmarks (outdated libs, etc)
23
+ * added examples execution to rspec - now rspec will notify if any example is not working. That way we will be able to provide code changes without having to worry that they will break examples
24
+ * added way more specs (93% code coverage)
25
+ * added rubocop to travis
26
+ * some minor cleanups
27
+ * moved from rvmrc (deprecated) to ruby-gemset and ruby-version
28
+ * removed unused gems
29
+ * added simplecov to track code coverage
30
+ * updated syntax to match 2.2.2
31
+ * moved versioning to Aspector::VERSION
32
+ * gemspec cleanup
33
+ * benchmarks now use RubyProf new version
34
+ * benchmarks moved to /benchmarks
35
+ * all the examples work again
36
+ * lib/aspector load order rearrange
37
+ * aspector advice rearrange - now it doesn't have to use integer values with constants
38
+ * before_filter as a separate TYPE - that way we don't have to "if" anything - works out of the box easier
39
+ * some method optimization or rewrites for many methods - works the same, looks way better
40
+ * advices metadata cleanup - no need for mandatory_options anymore
41
+ * API CHANGE: old_methods_only replaced with existing_methods_only - when I started to use aspector the "old" was hard to understand - existing is way more straightforward
42
+ * base disabled? now returns either true or false (no nil since it might change)
43
+ * boolean methods that return nil return now true/false
44
+ * before advices are now picked from before and before_filter advices
45
+ * METHOD_TEMPLATE update with new logger logic
46
+ * METHOD_TEMPLATE indentations are now more readable
47
+ * base_class_methods now generate all the bind methods automatically based on Aspector::Advice::TYPES
48
+ * deferred options to_s cleanup
49
+ * New logger that is based on Ruby default logger (::Logger) - same log levels, same API (except *args for our contextes)
50
+ * Logger is now much smaller
51
+ * Logging - constanize is now easier to read but the API stays the same (fallback as well)
52
+ * Method matcher#to_s uses now the & syntax for inspect
53
+ * ObjectExtension #returns removed - it was never used (throw was never used)
54
+ * Spec helper cleanup
55
+ * Rspec no longer needs monkey patching (config.disable_monkey_patching!)
56
+ * Class building logic is now wrapped in a module instead of a single method - all the class "building" and "cloning" happens in one place
57
+ * Added some pendings for future improvement
58
+ * skip_if_false for a before that should act as before_filter removed (since before filter is now a separate aspect)
59
+ * version dump
data/Gemfile CHANGED
@@ -1,18 +1,13 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  group :development do
4
- gem "rspec"
5
- gem "jeweler", "~> 1.6.4"
6
-
7
- gem 'ruby-prof', :platforms => [:mri]
8
-
9
- gem "guard", "~> 0.8.4"
10
- gem "guard-bundler", "~> 0.1.3"
11
- gem "guard-rspec", "~> 0.5.2"
12
- gem "guard-shell", "~> 0.1.1"
13
- gem 'rb-fsevent'
14
- gem 'growl', "~> 1.0.3"
15
-
16
- gem 'awesome_print'
4
+ gem 'rspec'
5
+ gem 'guard'
6
+ gem 'guard-bundler'
7
+ gem 'guard-rspec'
8
+ gem 'guard-shell'
9
+ gem 'rubocop'
17
10
  gem 'pry'
11
+ gem 'simplecov'
12
+ gem 'ruby-prof'
18
13
  end
@@ -1,62 +1,96 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- awesome_print (1.1.0)
5
- coderay (1.0.8)
6
- diff-lcs (1.1.3)
7
- git (1.2.5)
8
- growl (1.0.3)
9
- guard (0.8.8)
10
- thor (~> 0.14.6)
11
- guard-bundler (0.1.3)
12
- bundler (>= 1.0.0)
13
- guard (>= 0.2.2)
14
- guard-rspec (0.5.11)
15
- guard (>= 0.8.4)
16
- guard-shell (0.1.1)
17
- guard (>= 0.2.0)
18
- jeweler (1.6.4)
4
+ ast (2.0.0)
5
+ astrolabe (1.3.0)
6
+ parser (>= 2.2.0.pre.3, < 3.0)
7
+ coderay (1.1.0)
8
+ diff-lcs (1.2.5)
9
+ docile (1.1.5)
10
+ ffi (1.9.10)
11
+ formatador (0.2.5)
12
+ guard (2.12.8)
13
+ formatador (>= 0.2.4)
14
+ listen (>= 2.7, <= 4.0)
15
+ lumberjack (~> 1.0)
16
+ nenv (~> 0.1)
17
+ notiffany (~> 0.0)
18
+ pry (>= 0.9.12)
19
+ shellany (~> 0.0)
20
+ thor (>= 0.18.1)
21
+ guard-bundler (2.1.0)
19
22
  bundler (~> 1.0)
20
- git (>= 1.2.5)
21
- rake
22
- method_source (0.8.1)
23
- pry (0.9.10)
24
- coderay (~> 1.0.5)
25
- method_source (~> 0.8)
26
- slop (~> 3.3.1)
27
- pry (0.9.10-java)
28
- coderay (~> 1.0.5)
29
- method_source (~> 0.8)
30
- slop (~> 3.3.1)
31
- spoon (~> 0.0)
32
- rake (10.0.3)
33
- rb-fsevent (0.9.3)
34
- rspec (2.12.0)
35
- rspec-core (~> 2.12.0)
36
- rspec-expectations (~> 2.12.0)
37
- rspec-mocks (~> 2.12.0)
38
- rspec-core (2.12.2)
39
- rspec-expectations (2.12.1)
40
- diff-lcs (~> 1.1.3)
41
- rspec-mocks (2.12.1)
42
- ruby-prof (0.11.3)
43
- slop (3.3.3)
44
- spoon (0.0.1)
45
- thor (0.14.6)
23
+ guard (~> 2.2)
24
+ guard-compat (~> 1.1)
25
+ guard-compat (1.2.1)
26
+ guard-rspec (4.6.0)
27
+ guard (~> 2.1)
28
+ guard-compat (~> 1.1)
29
+ rspec (>= 2.99.0, < 4.0)
30
+ guard-shell (0.7.1)
31
+ guard (>= 2.0.0)
32
+ guard-compat (~> 1.0)
33
+ json (1.8.3)
34
+ listen (3.0.1)
35
+ rb-fsevent (>= 0.9.3)
36
+ rb-inotify (>= 0.9)
37
+ lumberjack (1.0.9)
38
+ method_source (0.8.2)
39
+ nenv (0.2.0)
40
+ notiffany (0.0.6)
41
+ nenv (~> 0.1)
42
+ shellany (~> 0.0)
43
+ parser (2.3.0.pre.2)
44
+ ast (>= 1.1, < 3.0)
45
+ powerpack (0.1.1)
46
+ pry (0.10.1)
47
+ coderay (~> 1.1.0)
48
+ method_source (~> 0.8.1)
49
+ slop (~> 3.4)
50
+ rainbow (2.0.0)
51
+ rb-fsevent (0.9.5)
52
+ rb-inotify (0.9.5)
53
+ ffi (>= 0.5.0)
54
+ rspec (3.3.0)
55
+ rspec-core (~> 3.3.0)
56
+ rspec-expectations (~> 3.3.0)
57
+ rspec-mocks (~> 3.3.0)
58
+ rspec-core (3.3.1)
59
+ rspec-support (~> 3.3.0)
60
+ rspec-expectations (3.3.0)
61
+ diff-lcs (>= 1.2.0, < 2.0)
62
+ rspec-support (~> 3.3.0)
63
+ rspec-mocks (3.3.1)
64
+ diff-lcs (>= 1.2.0, < 2.0)
65
+ rspec-support (~> 3.3.0)
66
+ rspec-support (3.3.0)
67
+ rubocop (0.32.1)
68
+ astrolabe (~> 1.3)
69
+ parser (>= 2.2.2.5, < 3.0)
70
+ powerpack (~> 0.1)
71
+ rainbow (>= 1.99.1, < 3.0)
72
+ ruby-progressbar (~> 1.4)
73
+ ruby-prof (0.15.8)
74
+ ruby-progressbar (1.7.5)
75
+ shellany (0.0.1)
76
+ simplecov (0.10.0)
77
+ docile (~> 1.1.0)
78
+ json (~> 1.8)
79
+ simplecov-html (~> 0.10.0)
80
+ simplecov-html (0.10.0)
81
+ slop (3.6.0)
82
+ thor (0.19.1)
46
83
 
47
84
  PLATFORMS
48
- java
49
85
  ruby
50
86
 
51
87
  DEPENDENCIES
52
- awesome_print
53
- growl (~> 1.0.3)
54
- guard (~> 0.8.4)
55
- guard-bundler (~> 0.1.3)
56
- guard-rspec (~> 0.5.2)
57
- guard-shell (~> 0.1.1)
58
- jeweler (~> 1.6.4)
88
+ guard
89
+ guard-bundler
90
+ guard-rspec
91
+ guard-shell
59
92
  pry
60
- rb-fsevent
61
93
  rspec
94
+ rubocop
62
95
  ruby-prof
96
+ simplecov
@@ -0,0 +1,118 @@
1
+ # Aspector
2
+
3
+ [<img src="https://secure.travis-ci.org/gcao/aspector.png" />](http://travis-ci.org/gcao/aspector)
4
+
5
+ Aspector = ASPECT Oriented Ruby programming
6
+
7
+ ## About
8
+
9
+ Aspector allows to use [aspect oriented programming](https://en.wikipedia.org/wiki/Aspect-oriented_programming) with Ruby.
10
+
11
+ Aspector allows adding additional behavior to existing code (an advice) without modifying the code itself, instead separately specifying which code is modified via a "pointcut" specification.
12
+
13
+ ## Highlights
14
+
15
+ * Encapsulate logic as aspects and apply to multiple targets easily
16
+ * Support before/before_filter/after/around advices
17
+ * Work anywhere - inside/outside the target class, before/after methods are created
18
+ * Use regexp matching to apply advices to multiple methods
19
+ * Small codebase, intuitive API
20
+ * Conditional aspects disabling/enabling
21
+ * Standarized logging API
22
+
23
+
24
+ ## Example usages
25
+
26
+ Aspector should be used whenever you have a cross-cutting concerns, especially when they don't perform any business logic. For example use can use it to provide things like:
27
+
28
+ * Logging
29
+ * Monitoring
30
+ * Performance benchmarking
31
+ * Any type of transactions wrapping
32
+ * Events producing for systems like Apache Kafka
33
+ * Etc...
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ gem install aspector
39
+ ```
40
+
41
+ or put it inside of your Gemfile:
42
+
43
+ ```bash
44
+ gem 'aspector'
45
+ ```
46
+
47
+ ## Examples
48
+
49
+ To see how to use Aspector, please review examples that are in [examples directory](examples/).
50
+
51
+ If you need more detailed examples, please review files in [spec/functionals](spec/functionals) and [spec/units/advices](spec/units/advices).
52
+
53
+ Here's a simple example how Aspector can be used:
54
+
55
+ ```ruby
56
+ class ExampleClass
57
+ def test
58
+ puts 'test'
59
+ end
60
+ end
61
+
62
+ aspect = Aspector do
63
+ target do
64
+ def do_this
65
+ puts 'do_this'
66
+ end
67
+ end
68
+
69
+ before :test, :do_this
70
+
71
+ before :test do
72
+ puts 'do_that'
73
+ end
74
+ end
75
+
76
+ aspect.apply(ExampleClass)
77
+ element = ExampleClass.new
78
+ element.test
79
+ aspect.disable
80
+ element.test
81
+
82
+ # Expected output
83
+ # do_this
84
+ # do_that
85
+ # test
86
+ # test
87
+ ```
88
+
89
+ ## Configuration options
90
+
91
+ Aspector is really easy to use. After installation it doesn't require any additional configuration. You can however set two environments variables that are related to logging:
92
+
93
+ | ENV variable name | Description |
94
+ |--------------------|--------------------------------------------------------------------------------------|
95
+ | ASPECTOR_LOGGER | Any logger class you want to use (if you don't want to use Aspector standard logger) |
96
+ | ASPECTOR_LOG_LEVEL | DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN |
97
+
98
+ Aspector::Logger inherits from a [standard Ruby logger](http://ruby-doc.org/stdlib-2.2.0/libdoc/logger/rdoc/Logger.html). Log levels and the API are pretty standard. You can however use yor own:
99
+
100
+ ```ruby
101
+ ASPECTOR_LOGGER='MyApp::Logger' ASPECTOR_LOG_LEVEL='any log level' ruby aspected_stuff.rb
102
+ ```
103
+
104
+ ## Contributing to aspector
105
+
106
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
107
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
108
+ * Fork the project
109
+ * Start a feature/bugfix branch
110
+ * Commit and push until you are happy with your contribution
111
+ * Make sure to add specs for it. This is important so I don't break it in a future version unintentionally.
112
+ * If it is a new functionality or feature please provide examples
113
+ * Please benchmark any functionality that might have a performance impact
114
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
115
+
116
+ ## Copyright
117
+
118
+ Copyright (c) 2015 Guoliang Cao, Maciej Mensfeld. See LICENSE.txt for further details.
data/Rakefile CHANGED
@@ -1,35 +1,19 @@
1
- # encoding: utf-8
2
-
3
1
  require 'rubygems'
4
2
  require 'bundler'
3
+ require 'rake'
4
+ require 'rspec/core'
5
+ require 'rspec/core/rake_task'
6
+
5
7
  begin
6
8
  Bundler.setup(:default, :development)
7
9
  rescue Bundler::BundlerError => e
8
10
  $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
11
+ $stderr.puts 'Run `bundle install` to install missing gems'
10
12
  exit e.status_code
11
13
  end
12
- require 'rake'
13
14
 
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "aspector"
18
- gem.homepage = "http://github.com/gcao/aspector"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Aspect Oriented Ruby Programming}
21
- gem.description = %Q{}
22
- gem.email = "gcao99@gmail.com"
23
- gem.authors = ["Guoliang Cao"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rspec/core'
29
- require 'rspec/core/rake_task'
30
15
  RSpec::Core::RakeTask.new(:spec) do |spec|
31
16
  spec.pattern = FileList['spec/**/*_spec.rb']
32
17
  end
33
18
 
34
- task :default => :spec
35
-
19
+ task default: :spec