snipgem 0.0.5
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.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/Rakefile +42 -0
- data/app/controllers/controller.rb +20 -0
- data/app/models/snippet.rb +37 -0
- data/app/models/utils/batchprocessing.rb +11 -0
- data/app/models/utils/codescanner.rb +58 -0
- data/app/models/utils/destinationfilewriter.rb +100 -0
- data/app/models/utils/sourcefilereader.rb +63 -0
- data/app/views/viewformatter.rb +133 -0
- data/bin/snip +6 -0
- data/config/filepath.config +0 -0
- data/lib/snip/version.rb +3 -0
- data/lib/snip.rb +56 -0
- data/my_snips.rb +0 -0
- data/pkg/snip-0.0.1.gem +0 -0
- data/rspec/rspec.rb +158 -0
- data/rspec/snip.sublime-project +9 -0
- data/rspec/snip.sublime-workspace +1644 -0
- data/rspec/test_snip_files/subfolder/test3.rb +31 -0
- data/rspec/test_snip_files/test.rb +22 -0
- data/rspec/test_snip_files/test2.rb +17 -0
- data/snip.gemspec +28 -0
- metadata +119 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
# <snip> Title of first snip
|
2
|
+
desc "create the database"
|
3
|
+
task :create do
|
4
|
+
puts "Creating file #{DB_PATH} if it doesn't exist..."
|
5
|
+
touch DB_PATH
|
6
|
+
end
|
7
|
+
# </snip>
|
8
|
+
|
9
|
+
# <snip> Title of this snip
|
10
|
+
desc "drop the database"
|
11
|
+
task :drop do
|
12
|
+
puts "Deleting #{DB_PATH}..."
|
13
|
+
rm_f DB_PATH
|
14
|
+
end
|
15
|
+
# </snip>
|
16
|
+
|
17
|
+
# <snip> Title of first snip
|
18
|
+
desc "create the database"
|
19
|
+
task :create do
|
20
|
+
puts "Creating file #{DB_PATH} if it doesn't exist..."
|
21
|
+
touch DB_PATH
|
22
|
+
end
|
23
|
+
# </snip>
|
24
|
+
|
25
|
+
# <snip> Title of this snip
|
26
|
+
desc "drop the database"
|
27
|
+
task :drop do
|
28
|
+
puts "Deleting #{DB_PATH}..."
|
29
|
+
rm_f DB_PATH
|
30
|
+
end
|
31
|
+
# </snip>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# <snip>
|
2
|
+
class OrangeTree
|
3
|
+
attr_reader :age, :height
|
4
|
+
def initialize
|
5
|
+
@age = 0
|
6
|
+
@oranges = []
|
7
|
+
end
|
8
|
+
#</snip>
|
9
|
+
|
10
|
+
# test <snip> TITLE
|
11
|
+
def age!
|
12
|
+
@oranges += Array.new(rand(1..10)) { Orange.new } if @age > 5
|
13
|
+
end
|
14
|
+
#</snip>
|
15
|
+
|
16
|
+
# ewre w<snip> test
|
17
|
+
def any_oranges?
|
18
|
+
!@oranges.empty?
|
19
|
+
end
|
20
|
+
# test </snip> test
|
21
|
+
|
22
|
+
def pick_an_orange!
|
data/snip.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'snip/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "snipgem"
|
8
|
+
spec.version = Snip::VERSION
|
9
|
+
spec.authors = ["jgerminario", "philril", "cmliotta"]
|
10
|
+
spec.email = ["jgerminario@gmail.com"]
|
11
|
+
spec.summary = %q{Snip is a code snipping tool to save your most interesting code for later review.}
|
12
|
+
spec.description = %q{Using simple tags, you can mark snips in your code without interrupting your workflow. At the end of the day, run 'snip' to gather your snips from all your code for easy review. Compatible with Ruby and JavaScript. Visit the GitHub homepage for further instructions and developer contact details.}
|
13
|
+
spec.homepage = "https://github.com/jgerminario/snip"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
# spec.executables = ["snip"]
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib", "db", "config", "app"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
25
|
+
# spec.add_development_dependency "sqlite3", "~> 1.3"
|
26
|
+
# spec.add_development_dependency "activerecord", "~>4.1"
|
27
|
+
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: snipgem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- jgerminario
|
8
|
+
- philril
|
9
|
+
- cmliotta
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: bundler
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.7'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '1.7'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rake
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ~>
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '10.0'
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ~>
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '10.0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rspec
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ~>
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.0'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '3.0'
|
57
|
+
description: Using simple tags, you can mark snips in your code without interrupting
|
58
|
+
your workflow. At the end of the day, run 'snip' to gather your snips from all your
|
59
|
+
code for easy review. Compatible with Ruby and JavaScript. Visit the GitHub homepage
|
60
|
+
for further instructions and developer contact details.
|
61
|
+
email:
|
62
|
+
- jgerminario@gmail.com
|
63
|
+
executables:
|
64
|
+
- snip
|
65
|
+
extensions: []
|
66
|
+
extra_rdoc_files: []
|
67
|
+
files:
|
68
|
+
- Gemfile
|
69
|
+
- LICENSE.txt
|
70
|
+
- Rakefile
|
71
|
+
- app/controllers/controller.rb
|
72
|
+
- app/models/snippet.rb
|
73
|
+
- app/models/utils/batchprocessing.rb
|
74
|
+
- app/models/utils/codescanner.rb
|
75
|
+
- app/models/utils/destinationfilewriter.rb
|
76
|
+
- app/models/utils/sourcefilereader.rb
|
77
|
+
- app/views/viewformatter.rb
|
78
|
+
- bin/snip
|
79
|
+
- config/filepath.config
|
80
|
+
- lib/snip.rb
|
81
|
+
- lib/snip/version.rb
|
82
|
+
- my_snips.rb
|
83
|
+
- pkg/snip-0.0.1.gem
|
84
|
+
- rspec/rspec.rb
|
85
|
+
- rspec/snip.sublime-project
|
86
|
+
- rspec/snip.sublime-workspace
|
87
|
+
- rspec/test_snip_files/subfolder/test3.rb
|
88
|
+
- rspec/test_snip_files/test.rb
|
89
|
+
- rspec/test_snip_files/test2.rb
|
90
|
+
- snip.gemspec
|
91
|
+
homepage: https://github.com/jgerminario/snip
|
92
|
+
licenses:
|
93
|
+
- MIT
|
94
|
+
metadata: {}
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
- db
|
100
|
+
- config
|
101
|
+
- app
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
requirements: []
|
113
|
+
rubyforge_project:
|
114
|
+
rubygems_version: 2.0.14
|
115
|
+
signing_key:
|
116
|
+
specification_version: 4
|
117
|
+
summary: Snip is a code snipping tool to save your most interesting code for later
|
118
|
+
review.
|
119
|
+
test_files: []
|