pretzel-orm 0.1.0
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/.gitignore +34 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +26 -0
- data/LICENSE +22 -0
- data/README.md +2 -0
- data/lib/pretzel/ext/orm.rb +17 -0
- data/pretzel.gemspec +23 -0
- data/test/environment.rb +4 -0
- data/test/scrap.db +0 -0
- data/test/scrap.rb +34 -0
- data/test/views/index.liquid +1 -0
- metadata +129 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 84f4e7d23c4632b43954f2e16cdc6dfeaeab3784
|
4
|
+
data.tar.gz: c18e78b97ca955b0add39019619773ebb56f1d4d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 20f163a57639f13698daacd48d521942ff245619084d70ace7bd63107d88c71995edbb37c708786ce17a94c19be1314c547a26f31d81955551f7752a79c8ff3a
|
7
|
+
data.tar.gz: abf647e4aaa1ca4329f670f03297ba81a2937a6f6b6c467ee9b36a6b68b7e4da2e15424e22e770a3a2110600fbf9a04b02e6f13f4e97abeedf445e36f9bba044
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
# Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
pretzel-database (0.1.0)
|
5
|
+
liquid (~> 3.0)
|
6
|
+
sequel (~> 4)
|
7
|
+
sqlite3 (~> 1.3)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
liquid (3.0.1)
|
13
|
+
minitest (5.5.1)
|
14
|
+
rack (1.6.0)
|
15
|
+
rack-test (0.6.3)
|
16
|
+
rack (>= 1.0)
|
17
|
+
sequel (4.20.0)
|
18
|
+
sqlite3 (1.3.10)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
ruby
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
minitest (~> 5.5)
|
25
|
+
pretzel-database!
|
26
|
+
rack-test (~> 0.6)
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Pretzelhands
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
data/pretzel.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "pretzel-orm"
|
3
|
+
s.version = "0.1.0"
|
4
|
+
s.licenses = "MIT"
|
5
|
+
s.summary = "A Sequel wrapper on steroids optimized for liquid"
|
6
|
+
s.description = "A Sequel wrapper on steroids optimized for liquid"
|
7
|
+
s.authors = ["Richard Blechinger"]
|
8
|
+
s.email = ["richard@blechi.at"]
|
9
|
+
s.homepage = "http://github.com/pretzelhands/database"
|
10
|
+
|
11
|
+
s.required_ruby_version = ">= 2.0.0"
|
12
|
+
|
13
|
+
s.files = `git ls-files`.split("\n")
|
14
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
|
17
|
+
s.add_runtime_dependency("liquid", "~> 3.0")
|
18
|
+
s.add_runtime_dependency("sequel", "~> 4")
|
19
|
+
s.add_runtime_dependency("sqlite3", "~> 1.3")
|
20
|
+
|
21
|
+
s.add_development_dependency("rack-test", "~> 0.6")
|
22
|
+
s.add_development_dependency("minitest", "~> 5.5")
|
23
|
+
end
|
data/test/environment.rb
ADDED
data/test/scrap.db
ADDED
Binary file
|
data/test/scrap.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# Scrap file. Code here is intended to test features while coding
|
3
|
+
# The code in here is not supposed to be sensible.
|
4
|
+
#
|
5
|
+
|
6
|
+
require_relative "environment"
|
7
|
+
|
8
|
+
require "pretzel/core"
|
9
|
+
require "pretzel/ext/templating"
|
10
|
+
|
11
|
+
Database = Pretzel::ORM::Database.sqlite("scrap.db")
|
12
|
+
Database.create_table :somethings do
|
13
|
+
primary_key :id
|
14
|
+
string :name
|
15
|
+
end
|
16
|
+
|
17
|
+
class Something < Pretzel::ORM::Model
|
18
|
+
exposes :name, :id
|
19
|
+
end
|
20
|
+
|
21
|
+
Something.create(:name => "Test name")
|
22
|
+
|
23
|
+
class Application < Pretzel::Core
|
24
|
+
extends Pretzel::Extension::Templating
|
25
|
+
end
|
26
|
+
|
27
|
+
Application.get "/" do
|
28
|
+
render :index, {
|
29
|
+
"entry" => Something.first
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
Rack::Handler::Thin.run Application.new
|
34
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>{{ entry.name }} | {{ entry.id }}</h1>
|
metadata
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pretzel-orm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Richard Blechinger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: liquid
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.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.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sequel
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rack-test
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5.5'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '5.5'
|
83
|
+
description: A Sequel wrapper on steroids optimized for liquid
|
84
|
+
email:
|
85
|
+
- richard@blechi.at
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- Gemfile
|
92
|
+
- Gemfile.lock
|
93
|
+
- LICENSE
|
94
|
+
- README.md
|
95
|
+
- lib/pretzel/ext/orm.rb
|
96
|
+
- pretzel.gemspec
|
97
|
+
- test/environment.rb
|
98
|
+
- test/scrap.db
|
99
|
+
- test/scrap.rb
|
100
|
+
- test/views/index.liquid
|
101
|
+
homepage: http://github.com/pretzelhands/database
|
102
|
+
licenses:
|
103
|
+
- MIT
|
104
|
+
metadata: {}
|
105
|
+
post_install_message:
|
106
|
+
rdoc_options: []
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 2.0.0
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubyforge_project:
|
121
|
+
rubygems_version: 2.2.2
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: A Sequel wrapper on steroids optimized for liquid
|
125
|
+
test_files:
|
126
|
+
- test/environment.rb
|
127
|
+
- test/scrap.db
|
128
|
+
- test/scrap.rb
|
129
|
+
- test/views/index.liquid
|