newrelic-rake 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1b0e5523a22c4d0af40b70de6f72abedc162c6e1
4
+ data.tar.gz: ed92a2ca729b79911705d1e8790c03e7aaf56af4
5
+ SHA512:
6
+ metadata.gz: 25f62b4e82aae4ba95b8d4961fe90b804cd08fba16d41bdc14e921f32363f68eeb31c4466885380a8b51c22ebb5da0a23c1c4d0c64a3c6eae89063ec1218946e
7
+ data.tar.gz: 59b0222851379de5ae9d8a9b3682dd2e1dcd20ea9dfc4d444b85c78935bdeb2b8c18b7b1beaaad402a1c7dca026f4d8c6c03455b0296f018a099bc67193d7109
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ log/
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Next Release
2
+
3
+ ## 1.1.0 (03/15/2013)
4
+
5
+ * Make sure #method_tracer is there by the time we start tracking.
6
+ * Add tests.
7
+
8
+ ## 1.0.0 (10/11/2012)
9
+
10
+ * Initial public release
data/CONTRIBUTION.md ADDED
@@ -0,0 +1,12 @@
1
+ # CONTRIBUTING
2
+
3
+ We love pull requests. Here's a quick guide:
4
+
5
+ 1. Fork it
6
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
7
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
8
+ 4. Push to the branch (`git push origin my-new-feature`)
9
+ 5. Create new Pull Request
10
+
11
+ Please make sure you add a test for your change and all tests are passed.
12
+ (`bundle && rspec spec`)
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Richard Huang
1
+ Copyright (c) 2012 - 2013 Richard Huang
2
2
 
3
3
  MIT License
4
4
 
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -20,11 +20,17 @@ Or install it yourself as:
20
20
 
21
21
  nothing special to set.
22
22
 
23
- ## Contributing
23
+ ## Authors and Contributors
24
24
 
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
25
+ * [Richard Huang](https://github.com/flyerhzm) - Creator of the project
26
+ * [Yury Velikanau](yury.velikanau@gmail.com) - Add tests, fix newrelic
27
+ method tracer.
30
28
 
29
+ Please fork and contribute, any help in making this project better is appreciated!
30
+
31
+ This project is a member of the [OSS Manifesto](http://ossmanifesto.org/).
32
+
33
+ ## Copyright
34
+
35
+ Copyright @ 2012 - 2013 Richard Huang. See
36
+ [MIT-LICENSE](https://github.com/flyerhzm/newrelic-rake/blob/master/MIT-LICENSE) for details
data/Rakefile CHANGED
@@ -1 +1,12 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
3
+
4
+ desc 'Default: run unit tests'
5
+ task :default => :test
6
+
7
+ desc 'Test newrelic-rake'
8
+ Rake::TestTask.new(:test) do |t|
9
+ t.libs << 'test'
10
+ t.pattern = 'test/**/*_test.rb'
11
+ t.verbose = true
12
+ end
@@ -1,3 +1,5 @@
1
+ require 'new_relic/agent/method_tracer'
2
+
1
3
  DependencyDetection.defer do
2
4
  @name = :rake
3
5
 
@@ -6,7 +8,7 @@ DependencyDetection.defer do
6
8
  end
7
9
 
8
10
  executes do
9
- NewRelic::Agent.logger.debug 'Installing Rake instrumentation'
11
+ ::NewRelic::Agent.logger.info 'Installing Rake instrumentation'
10
12
  end
11
13
 
12
14
  executes do
@@ -23,4 +25,3 @@ DependencyDetection.defer do
23
25
  end
24
26
  end
25
27
  end
26
-
@@ -1,5 +1,5 @@
1
1
  module Newrelic
2
2
  module Rake
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -12,6 +12,8 @@ Gem::Specification.new do |gem|
12
12
  gem.summary = %q{newrelic instrument for rake task.}
13
13
  gem.homepage = ""
14
14
 
15
+ gem.add_dependency 'newrelic_rpm', '>= 3.1.0'
16
+
15
17
  gem.files = `git ls-files`.split($/)
16
18
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
19
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
@@ -0,0 +1,26 @@
1
+ require 'test/unit'
2
+ require 'newrelic-rake/instrument'
3
+
4
+ class TestNewRelicRedis < Test::Unit::TestCase
5
+ include NewRelic::Agent::Instrumentation::ControllerInstrumentation
6
+
7
+ def setup
8
+ NewRelic::Agent.manual_start
9
+ @engine = NewRelic::Agent.instance.stats_engine
10
+ @engine.clear_stats
11
+
12
+ @sampler = NewRelic::Agent.instance.transaction_sampler
13
+ @sampler.reset!
14
+ @sampler.start_builder
15
+ end
16
+
17
+ def teardown
18
+ @sampler.clear_builder
19
+ end
20
+
21
+ def test_metrics
22
+ Rake::Task.define_task('foo')
23
+ Rake::Task['foo'].invoke
24
+ assert @engine.metrics.include?('OtherTransaction/Rake/Rake::Task/foo'), 'rake task is not in metrics'
25
+ end
26
+ end
metadata CHANGED
@@ -1,16 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Richard Huang
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-11 00:00:00.000000000 Z
13
- dependencies: []
11
+ date: 2013-03-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: newrelic_rpm
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.1.0
14
27
  description: newrelic instrument for rake task
15
28
  email:
16
29
  - flyerhzm@gmail.com
@@ -19,36 +32,40 @@ extensions: []
19
32
  extra_rdoc_files: []
20
33
  files:
21
34
  - .gitignore
35
+ - CHANGELOG.md
36
+ - CONTRIBUTION.md
22
37
  - Gemfile
23
- - LICENSE.txt
38
+ - MIT_LICENSE
24
39
  - README.md
25
40
  - Rakefile
26
41
  - lib/newrelic-rake.rb
27
42
  - lib/newrelic-rake/instrument.rb
28
43
  - lib/newrelic-rake/version.rb
29
44
  - newrelic-rake.gemspec
45
+ - test/newrelic_rake_test.rb
30
46
  homepage: ''
31
47
  licenses: []
48
+ metadata: {}
32
49
  post_install_message:
33
50
  rdoc_options: []
34
51
  require_paths:
35
52
  - lib
36
53
  required_ruby_version: !ruby/object:Gem::Requirement
37
- none: false
38
54
  requirements:
39
- - - ! '>='
55
+ - - '>='
40
56
  - !ruby/object:Gem::Version
41
57
  version: '0'
42
58
  required_rubygems_version: !ruby/object:Gem::Requirement
43
- none: false
44
59
  requirements:
45
- - - ! '>='
60
+ - - '>='
46
61
  - !ruby/object:Gem::Version
47
62
  version: '0'
48
63
  requirements: []
49
64
  rubyforge_project:
50
- rubygems_version: 1.8.17
65
+ rubygems_version: 2.0.2
51
66
  signing_key:
52
- specification_version: 3
67
+ specification_version: 4
53
68
  summary: newrelic instrument for rake task.
54
- test_files: []
69
+ test_files:
70
+ - test/newrelic_rake_test.rb
71
+ has_rdoc: