termworld 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61f3dc913d21c4dbfb0a62664ec12bf317da090633b1eafb4f443475e3bef04c
4
- data.tar.gz: 9bd66c4de8793b4a5347c1fb38ac5680a1f44c71d4e07f9a5d9327978920dcbe
3
+ metadata.gz: ec994ed512655c180ec297accf4119f15db32350aa248982485b4935540e9915
4
+ data.tar.gz: ae3a910c55b2e3396b62ad2adf6aa4a563f20de6d9aeaa805b93750d2622ad21
5
5
  SHA512:
6
- metadata.gz: 8104d4d2bed9f35a00e3da48ae5c4bc97200da638e054e2719d028d6361a95d407c64e080d53af6d7f419b45586c2339b49bfb10219c6a787714d2c469d4b6d1
7
- data.tar.gz: dd6e039d168a5ee5c9be37b7ed948516cdcc63576345d772785709bb9965abbb0105cd0b641a19ebfa7ef0afb4f8b74fc519541eadb80f4145dc1f1f1deaebc3
6
+ metadata.gz: b2b34d527b416a67c9aa72f09a2b3b4ed21cd972c86f62d2d64fbdafec6dd24f16a0acf4197eb0777f1a719a9e95b0284f5b2c9c357490993e18600a7c9c20c4
7
+ data.tar.gz: 48ae1d79ea3d002b92087c8409d34cd5918ec59330135fcfea582e004470abec88edfebe390322cc8a17926374e64db23381b77144ba6dccc56a60819bde8b2a
data/.gitignore CHANGED
@@ -10,3 +10,5 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  /vendor/bundle
13
+
14
+ *.db
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- termworld (0.1.1)
4
+ termworld (0.1.2)
5
5
  sequel
6
6
  sqlite3
7
7
  thor
data/bin/exec ADDED
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ bundle exec termworld $@
data/bin/release ADDED
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ bundle exec rake release
@@ -1,3 +1,3 @@
1
1
  module Termworld
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -0,0 +1,8 @@
1
+ module Termworld
2
+ class DB
3
+ def initialize
4
+ $db = Sequel.sqlite('termworld.db')
5
+ User.new
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ module Termworld
2
+ class User
3
+ def initialize
4
+ $db.create_table :users do
5
+ primary_key :id
6
+ String :name
7
+ Integer :price
8
+ end
9
+ end
10
+ end
11
+ end
data/lib/termworld.rb CHANGED
@@ -1,15 +1,13 @@
1
1
  require "thor"
2
- require "termworld/cli"
3
- require "termworld/constants/version"
4
- Dir.glob("lib/**/*.rb").map { |file|
5
- file.gsub(/^lib\//, '').gsub(/\.rb$/, '')
6
- }.reject { |file|
7
- file == 'termworld'
8
- }.each { |file|
9
- require file
10
- }
2
+ require "sequel"
3
+
4
+ Dir.glob("lib/**/*.rb")
5
+ .map { |file| file.gsub(/^lib\//, '').gsub(/\.rb$/, '') }
6
+ .reject { |file| file == 'termworld' }
7
+ .each { |file| require file }
11
8
  module Termworld
12
9
  def self.start
13
- Termworld::CLI.start
10
+ DB.new
11
+ CLI.start
14
12
  end
15
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: termworld
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kthatoto
@@ -126,11 +126,15 @@ files:
126
126
  - README.md
127
127
  - Rakefile
128
128
  - bin/console
129
+ - bin/exec
130
+ - bin/release
129
131
  - bin/setup
130
132
  - exe/termworld
131
133
  - lib/termworld.rb
132
134
  - lib/termworld/cli.rb
133
135
  - lib/termworld/constants/version.rb
136
+ - lib/termworld/db/db.rb
137
+ - lib/termworld/db/user.rb
134
138
  - termworld.gemspec
135
139
  homepage: https://github.com/kthatoto/termworld
136
140
  licenses: