-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
133 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ require "rspec/core/rake_task" | |
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
task :default => :spec | ||
task default: :spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,19 @@ Gem::Specification.new do |spec| | |
spec.authors = ["Bill Dueber"] | ||
spec.email = ["[email protected]"] | ||
|
||
spec.summary = %q{Keep a database of the data in the hathifiles} | ||
spec.summary = "Keep a database of the data in the hathifiles" | ||
spec.homepage = "https://github.com/billdueber/hathifiles_database" | ||
spec.license = "MIT" | ||
|
||
spec.metadata["allowed_push_host"] = "http://gems.www.lib.umich.edu" | ||
|
||
spec.metadata["homepage_uri"] = spec.homepage | ||
spec.metadata["source_code_uri"] = spec.homepage | ||
spec.metadata["changelog_uri"] = spec.homepage + '/CHANGELOG.md' | ||
spec.metadata["changelog_uri"] = spec.homepage + "/CHANGELOG.md" | ||
|
||
# Specify which files should be added to the gem when it is released. | ||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git. | ||
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do | ||
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do | ||
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
end | ||
spec.bindir = "exe" | ||
|
@@ -33,16 +33,14 @@ Gem::Specification.new do |spec| | |
spec.add_development_dependency "pry" | ||
spec.add_development_dependency "yard" | ||
|
||
spec.add_dependency 'dotenv' | ||
spec.add_dependency 'ettin' # config | ||
spec.add_dependency 'library_stdnums' # normalize | ||
spec.add_dependency 'sequel' | ||
spec.add_dependency 'hanami-cli' # command line | ||
|
||
spec.add_dependency 'sqlite3' | ||
spec.add_dependency 'mysql2' | ||
spec.add_dependency 'tty-prompt' | ||
spec.add_dependency 'date_named_file' | ||
|
||
spec.add_dependency "dotenv" | ||
spec.add_dependency "ettin" # config | ||
spec.add_dependency "library_stdnums" # normalize | ||
spec.add_dependency "sequel" | ||
spec.add_dependency "hanami-cli" # command line | ||
|
||
spec.add_dependency "sqlite3" | ||
spec.add_dependency "mysql2" | ||
spec.add_dependency "tty-prompt" | ||
spec.add_dependency "date_named_file" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,31 @@ | ||
require 'date' | ||
require 'hanami/cli' | ||
require "date" | ||
require "hanami/cli" | ||
|
||
module HathifilesDatabase | ||
module CLI | ||
module Commands | ||
extend Hanami::CLI::Registry | ||
|
||
class Date8 < Date | ||
|
||
def to_s | ||
self.strftime('%Y%m%d') | ||
strftime("%Y%m%d") | ||
end | ||
|
||
def self.range_since(dt) | ||
dateify(dt).upto self.today | ||
dateify(dt).upto today | ||
end | ||
|
||
def self.dateify(dt) | ||
if dt.respond_to? :to_date | ||
dt.to_date | ||
else | ||
self.parse(dt.to_s) | ||
parse(dt.to_s) | ||
end | ||
end | ||
end | ||
|
||
class Update | ||
|
||
|
||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.