peek-svn 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
@@ -0,0 +1,11 @@
1
+ # 1.0
2
+
3
+ * Initial release
4
+
5
+ # 1.0.1
6
+
7
+ * Changed rev_number to return the raw version number and then let the view render the markup
8
+
9
+ # 1.0.2
10
+
11
+ * Renamed to Peek::SVN to match the parent project.
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in peek-svn.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # jquery-rails is used by the dummy application
9
+ gem "jquery-rails"
10
+
11
+ # Declare any dependencies that are still in development here instead of in
12
+ # your gemspec. These might include edge Rails or gems from your path or
13
+ # Git. Remember to move these dependencies to your gemspec before releasing
14
+ # your gem to rubygems.org.
15
+
16
+ # To use debugger
17
+ # gem 'debugger'
@@ -0,0 +1,20 @@
1
+ Copyright 2013 Neil Cowburn
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,37 @@
1
+ # Peek::Svn
2
+
3
+ Provide a peek into the Subversion info of your Rails application.
4
+
5
+ Things this peek view provides:
6
+
7
+ - View the current revision of your Subversion repo
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'peek-svn'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install peek-svn
22
+
23
+ ## Usage
24
+
25
+ Add the following to your `config/initializers/peek.rb`:
26
+
27
+ ```ruby
28
+ Peek.into Peek::Views::Svn
29
+ ```
30
+
31
+ ## Contributing
32
+
33
+ 1. Fork it
34
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
35
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
36
+ 4. Push to the branch (`git push origin my-new-feature`)
37
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,3 @@
1
+ <div class="rev">
2
+ Rev: <strong><%= view.rev_number %></strong>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ require "peek/views/svn"
2
+ require "peek-svn/version"
3
+ require "peek-svn/railtie"
@@ -0,0 +1,6 @@
1
+ module Peek
2
+ module Svn
3
+ class Railtie < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Peek
2
+ module Svn
3
+ VERSION = "1.0.2"
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ module Peek
2
+ module Views
3
+ class Svn < View
4
+ def rev_number
5
+ `svnversion -n "#{Rails.root}"`.chomp.gsub(/[A-Z]/,'')
6
+ end
7
+ end
8
+ end
9
+ end
10
+
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :peek-svn do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'peek-svn/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'peek-svn'
8
+ gem.version = Peek::Svn::VERSION
9
+ gem.authors = ['Neil Cowburn']
10
+ gem.email = ['neilco@gmail.com']
11
+ gem.description = %q{Provide a peek into the Subversion info of your Rails application.}
12
+ gem.summary = %q{Provide a peek into the Subversion info of your Rails application.}
13
+ gem.homepage = 'https://github.com/neilco/peek-svn'
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.require_paths = ['lib']
17
+
18
+ gem.add_dependency 'peek'
19
+ end
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: peek-svn
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Neil Cowburn
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: peek
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Provide a peek into the Subversion info of your Rails application.
31
+ email:
32
+ - neilco@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - CHANGELOG.md
39
+ - Gemfile
40
+ - MIT-LICENSE
41
+ - README.md
42
+ - Rakefile
43
+ - app/views/peek/views/_svn.html.erb
44
+ - lib/peek-svn.rb
45
+ - lib/peek-svn/railtie.rb
46
+ - lib/peek-svn/version.rb
47
+ - lib/peek/views/svn.rb
48
+ - lib/tasks/peek-svn_tasks.rake
49
+ - peek-svn.gemspec
50
+ homepage: https://github.com/neilco/peek-svn
51
+ licenses: []
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 1.8.25
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: Provide a peek into the Subversion info of your Rails application.
74
+ test_files: []
75
+ has_rdoc: