snippets 0.0.1

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.
@@ -0,0 +1,3 @@
1
+ Gemfile.lock
2
+ .bundle
3
+ pkg/*
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --profile
3
+ -r spec_helper
4
+ -t focus
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <http://unlicense.org/>
File without changes
@@ -0,0 +1,10 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ task :default => :spec
5
+
6
+ desc 'run the specs'
7
+ task :spec do
8
+ sh 'rspec spec'
9
+ end
10
+
@@ -0,0 +1,6 @@
1
+ require 'active_record'
2
+
3
+ module Snippets
4
+ autoload :Server, 'snippets/server'
5
+ autoload :Snippet, 'snippets/snippet'
6
+ end
@@ -0,0 +1,7 @@
1
+ class Snippets::Server < Sinatra::Base
2
+
3
+ get '/' do
4
+ 'hello'
5
+ end
6
+
7
+ end
@@ -0,0 +1,3 @@
1
+ class Snippets::Snippet < ActiveRecord::Base
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ module Snippets
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,29 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "snippets/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "snippets"
7
+ s.version = Snippets::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Tim Connor"]
10
+ s.email = ["timocratic@gmail.com"]
11
+ s.homepage = "http://github.com/timocratic/snippets"
12
+ s.summary = %q{Rails engine for editing .md to generate HTML snippets}
13
+ s.description = %q{Not a full-fledged CMS, just a simple way to edit content
14
+ in a Rails app so the developers don't have to get involved in editing.'}
15
+
16
+ s.rubyforge_project = "snippets"
17
+
18
+ s.add_dependency('activerecord', "> 3.0.0")
19
+ s.add_dependency('sinatra')
20
+
21
+ s.add_development_dependency('rspec', ">= 2.0")
22
+ s.add_development_dependency('sqlite3')
23
+ s.add_development_dependency('rack-test')
24
+
25
+ s.files = `git ls-files`.split("\n")
26
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
28
+ s.require_paths = ["lib"]
29
+ end
@@ -0,0 +1,3 @@
1
+ describe Snippets::Snippet do
2
+ it { should be_a_kind_of(ActiveRecord::Base) }
3
+ end
@@ -0,0 +1,12 @@
1
+ describe "server" do
2
+ include Rack::Test::Methods
3
+
4
+ def app
5
+ Snippets::Server
6
+ end
7
+
8
+ it "should say hello" do
9
+ get ''
10
+ last_response.body.should == 'hello'
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ require 'bundler'
2
+ Bundler.require
3
+
4
+ require 'rack/test'
5
+
6
+ require 'support/active_record'
7
+
8
+ #ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
9
+
10
+ RSpec.configure do |c|
11
+ c.filter_run :focus => true
12
+ c.run_all_when_everything_filtered = true
13
+ end
@@ -0,0 +1,9 @@
1
+ ActiveRecord::Base.establish_connection(
2
+ :adapter => 'sqlite3',
3
+ :database => "spec/tmp/test.sqlite3"
4
+ )
5
+
6
+ # ActiveRecord::Schema.define do
7
+ # create_table :snippets do |t|
8
+ # end
9
+ # end
File without changes
Binary file
metadata ADDED
@@ -0,0 +1,164 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: snippets
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Tim Connor
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-03-15 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: activerecord
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">"
28
+ - !ruby/object:Gem::Version
29
+ hash: 7
30
+ segments:
31
+ - 3
32
+ - 0
33
+ - 0
34
+ version: 3.0.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: sinatra
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: rspec
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 2
62
+ - 0
63
+ version: "2.0"
64
+ type: :development
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: sqlite3
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :development
79
+ version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
81
+ name: rack-test
82
+ prerelease: false
83
+ requirement: &id005 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ type: :development
93
+ version_requirements: *id005
94
+ description: |-
95
+ Not a full-fledged CMS, just a simple way to edit content
96
+ in a Rails app so the developers don't have to get involved in editing.'
97
+ email:
98
+ - timocratic@gmail.com
99
+ executables: []
100
+
101
+ extensions: []
102
+
103
+ extra_rdoc_files: []
104
+
105
+ files:
106
+ - .gitignore
107
+ - .rspec
108
+ - Gemfile
109
+ - Gemfile.lock
110
+ - LICENSE
111
+ - README.md
112
+ - Rakefile
113
+ - lib/snippets.rb
114
+ - lib/snippets/server.rb
115
+ - lib/snippets/snippet.rb
116
+ - lib/snippets/version.rb
117
+ - snippets.gemspec
118
+ - spec/snippet_spec.rb
119
+ - spec/snippets_server_spec.rb
120
+ - spec/spec_helper.rb
121
+ - spec/support/active_record.rb
122
+ - spec/tmp/.gitkeep
123
+ - spec/tmp/test.sqlite3
124
+ has_rdoc: true
125
+ homepage: http://github.com/timocratic/snippets
126
+ licenses: []
127
+
128
+ post_install_message:
129
+ rdoc_options: []
130
+
131
+ require_paths:
132
+ - lib
133
+ required_ruby_version: !ruby/object:Gem::Requirement
134
+ none: false
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ hash: 3
139
+ segments:
140
+ - 0
141
+ version: "0"
142
+ required_rubygems_version: !ruby/object:Gem::Requirement
143
+ none: false
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ hash: 3
148
+ segments:
149
+ - 0
150
+ version: "0"
151
+ requirements: []
152
+
153
+ rubyforge_project: snippets
154
+ rubygems_version: 1.6.2
155
+ signing_key:
156
+ specification_version: 3
157
+ summary: Rails engine for editing .md to generate HTML snippets
158
+ test_files:
159
+ - spec/snippet_spec.rb
160
+ - spec/snippets_server_spec.rb
161
+ - spec/spec_helper.rb
162
+ - spec/support/active_record.rb
163
+ - spec/tmp/.gitkeep
164
+ - spec/tmp/test.sqlite3