Permalink
Browse files

use double quotes instead of single quotes

  • Loading branch information...
1 parent 1a6cc24 commit c85450703950460b17b296551d5b38ba74760ee4 @xithan xithan committed Aug 8, 2016
Showing 430 changed files with 6,501 additions and 6,501 deletions.
View
@@ -39,7 +39,7 @@ Style/RegexpLiteral:
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
Enabled: true
Style/StringLiterals:
- EnforcedStyle: single_quotes
+ EnforcedStyle: double_quotes
Style/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
Metrics/MethodLength:
View
@@ -25,5 +25,5 @@ task :cp_tmpsets do
end
def version
- File.open(File.expand_path('../card/VERSION', __FILE__)).read.chomp
+ File.open(File.expand_path("../card/VERSION", __FILE__)).read.chomp
end
View
@@ -1,27 +1,27 @@
# -*- encoding : utf-8 -*-
Gem::Specification.new do |s|
- s.name = 'card'
- s.version = File.open(File.expand_path('../VERSION', __FILE__)).read.chomp
+ s.name = "card"
+ s.version = File.open(File.expand_path("../VERSION", __FILE__)).read.chomp
s.authors =
- ['Ethan McCutchen', 'Lewis Hoffman', 'Gerry Gleason', "Philipp Kühl"]
- s.email = ['info@wagn.org']
+ ["Ethan McCutchen", "Lewis Hoffman", "Gerry Gleason", "Philipp Kühl"]
+ s.email = ["info@wagn.org"]
# s.date = '2013-12-20'
- s.summary = 'an atomic, set-driven content engine'
+ s.summary = "an atomic, set-driven content engine"
s.description =
- 'Cards are data atoms grouped into Sets to which Rules can apply. '\
- 'Cards can formatted with Views and transformed with Events.'
- s.homepage = 'http://wagn.org'
- s.licenses = ['GPL-2.0', 'GPL-3.0']
+ "Cards are data atoms grouped into Sets to which Rules can apply. "\
+ "Cards can formatted with Views and transformed with Events."
+ s.homepage = "http://wagn.org"
+ s.licenses = ["GPL-2.0", "GPL-3.0"]
s.files = `git ls-files`.split $INPUT_RECORD_SEPARATOR
# add submodule files (seed data)
morepaths = `git submodule --quiet foreach pwd`.split $OUTPUT_RECORD_SEPARATOR
morepaths.each do |submod_path|
gem_root = File.expand_path File.dirname(__FILE__)
- relative_submod_path = submod_path.gsub "#{gem_root}/", ''
+ relative_submod_path = submod_path.gsub "#{gem_root}/", ""
Dir.chdir(submod_path) do
morefiles = `git ls-files`.split $OUTPUT_RECORD_SEPARATOR
s.files += morefiles.map do |filename|
@@ -31,31 +31,31 @@ Gem::Specification.new do |s|
end
s.test_files = s.files.grep(%r{^(test|spec|features)/})
- s.require_paths = ['lib']
+ s.require_paths = ["lib"]
- s.required_ruby_version = '>= 1.9.3'
+ s.required_ruby_version = ">= 1.9.3"
[
- ['smartname', '0.3.1'],
- ['uuid', '~> 2.3'],
+ ["smartname", "0.3.1"],
+ ["uuid", "~> 2.3"],
# with carrierwave 0.11.1 and 0.11.2 wagn hangs in a loop on creating
# style and script machine output
- ['carrierwave', '<= 0.11.0'],
- ['htmlentities', '~> 4.3'],
- ['mini_magick', '~> 4.2'],
+ ["carrierwave", "<= 0.11.0"],
+ ["htmlentities", "~> 4.3"],
+ ["mini_magick", "~> 4.2"],
# recaptcha 0.4.0 is last version that doesn't require ruby 2.0
- ['recaptcha', '~> 0.4.0'],
- ['coderay', '~> 1.0'],
- ['sass', '~> 3.2'],
- ['coffee-script', '~> 2.2'],
- ['uglifier', '~> 3.0'],
- ['haml', '~> 4.0'],
- ['kaminari', '~> 0.16'],
- ['bootstrap-kaminari-views', '~> 0'],
- ['diff-lcs', '~> 1.2'],
+ ["recaptcha", "~> 0.4.0"],
+ ["coderay", "~> 1.0"],
+ ["sass", "~> 3.2"],
+ ["coffee-script", "~> 2.2"],
+ ["uglifier", "~> 3.0"],
+ ["haml", "~> 4.0"],
+ ["kaminari", "~> 0.16"],
+ ["bootstrap-kaminari-views", "~> 0"],
+ ["diff-lcs", "~> 1.2"],
# mime-types can be removed if we drop support for ruby 1.9.3
# mime-types 3.0 uses mime-types-data which isn't compatible with 1.9.3
- ['mime-types', '2.99.1']
+ ["mime-types", "2.99.1"]
].each do |dep|
s.add_runtime_dependency(*dep)
end
@@ -28,26 +28,26 @@ module Merging
# h = {:class => "btn"} # => {:class=>"btn"}
# h.css_merge({:class => "btn-primary"}) # => {:class=>"btn
# btn-primary"}
- def css_merge other_hash, separator=' '
+ def css_merge other_hash, separator=" "
merge(other_hash) do |key, old, new|
key == :class ? old.to_s + separator + new.to_s : new
end
end
- def css_merge! other_hash, separator=' '
+ def css_merge! other_hash, separator=" "
merge!(other_hash) do |key, old, new|
key == :class ? old.to_s + separator + new.to_s : new
end
end
# merge string values with `separator`
- def string_merge other_hash, separator=' '
+ def string_merge other_hash, separator=" "
merge(other_hash) do |_key, old, new|
old.is_a?(String) ? old + separator + new.to_s : new
end
end
- def string_merge! other_hash, separator=' '
+ def string_merge! other_hash, separator=" "
merge!(other_hash) do |_key, old, new|
old.is_a?(String) ? old + separator + new.to_s : new
end
@@ -6,7 +6,7 @@ def page_url_for page
p = params_for(page)
p.delete :controller
p.delete :action
- card = Card[p.delete('id')]
+ card = Card[p.delete("id")]
card.format.path p
end
@@ -3,11 +3,11 @@
# Add new inflection rules using the following format
ActiveSupport::Inflector.inflections do |inflect|
- inflect.irregular 'grave', 'graveyard'
- inflect.uncountable 'this'
+ inflect.irregular "grave", "graveyard"
+ inflect.uncountable "this"
# inflect.uncountable 'plus'
- inflect.uncountable 'anonymous'
- inflect.uncountable 's'
+ inflect.uncountable "anonymous"
+ inflect.uncountable "s"
inflect.singular(/(ss)$/i, '\1')
inflect.plural(/(ss)$/i, '\1')
end
@@ -5,7 +5,7 @@
# Necessary since 'card' is packaged as a gem which is not an Engine
I18n.load_path += Dir.glob(Pathname(__FILE__).parent.parent.to_s +
- '/locales/*.{rb,yml}')
+ "/locales/*.{rb,yml}")
# see http://svenfuchs.com/2009/7/19/experimental-ruby-i18n-extensions-pluralization-fallbacks-gettext-cache-and-chained-backend
module I18n::Backend::Transformers
@@ -38,7 +38,7 @@ def transform_text entry
# with ENV['WAGN_I18N_DEMARK']=1 on the command line in server startup,
# or ./config/environments/*.rb file.
-if ENV['WAGN_I18N_DEMARK']
+if ENV["WAGN_I18N_DEMARK"]
I18n::Backend::Simple.send(:include, I18n::Backend::Transformers)
- puts 'WAGN_I18N_DEMARK is active'
+ puts "WAGN_I18N_DEMARK is active"
end
@@ -6,8 +6,8 @@
# Mime::Type.register 'application/rss+xml', :rss
# Mime::Type.register_alias 'text/plain', :csv # useful for testing csv in browser
-Mime::Type.register_alias 'text/plain', :txt
-Mime::Type.register 'application/vnd.google-earth.kml+xml', :kml
+Mime::Type.register_alias "text/plain", :txt
+Mime::Type.register "application/vnd.google-earth.kml+xml", :kml
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
@@ -11,7 +11,7 @@ def load_recaptcha_config setting
def card_table_ready?
# FIXME: this test should be more generally usable
- ActiveRecord::Base.connection.table_exists?('cards') &&
+ ActiveRecord::Base.connection.table_exists?("cards") &&
Card.ancestors.include?(ActiveRecord::Base)
end
@@ -1,3 +1,3 @@
-require 'uuid'
+require "uuid"
# -*- encoding : utf-8 -*-
-UUID.state_file = false if ENV['UUID_STATE_FILE'] == 'off'
+UUID.state_file = false if ENV["UUID_STATE_FILE"] == "off"
@@ -1,5 +1,5 @@
# -*- encoding : utf-8 -*-
-require 'card/version'
+require "card/version"
class RequireEarlierMigrations < ActiveRecord::Migration
def self.up
@@ -14,6 +14,6 @@ def self.up
end
def self.down
- raise 'Older migrations have been removed because of incompatibility.'
+ raise "Older migrations have been removed because of incompatibility."
end
end
@@ -10,6 +10,6 @@ def self.up
end
def self.down
- raise 'Older migrations have been removed because of incompatibility.'
+ raise "Older migrations have been removed because of incompatibility."
end
end
@@ -10,6 +10,6 @@ def self.up
end
def self.down
- raise 'Older migrations have been removed because of incompatibility.'
+ raise "Older migrations have been removed because of incompatibility."
end
end
@@ -1,19 +1,19 @@
# -*- encoding : utf-8 -*-
class UpdateLinkType < ActiveRecord::Migration
class TmpReference < ActiveRecord::Base
- self.table_name = 'card_references'
+ self.table_name = "card_references"
end
def up
TmpReference.update_all(present: 1)
- TmpReference.where(link_type: 'T').update_all(link_type: 'I')
- TmpReference.where(link_type: 'M').update_all(present: 0, link_type: 'L')
- TmpReference.where(link_type: 'W').update_all(present: 0, link_type: 'I')
+ TmpReference.where(link_type: "T").update_all(link_type: "I")
+ TmpReference.where(link_type: "M").update_all(present: 0, link_type: "L")
+ TmpReference.where(link_type: "W").update_all(present: 0, link_type: "I")
end
def down
- TmpReference.where(present: 0, link_type: 'L').update_all(link_type: 'M')
- TmpReference.where(present: 0, link_type: 'I').update_all(link_type: 'W')
- TmpReference.where(present: 1, link_type: 'I').update_all(link_type: 'T')
+ TmpReference.where(present: 0, link_type: "L").update_all(link_type: "M")
+ TmpReference.where(present: 0, link_type: "I").update_all(link_type: "W")
+ TmpReference.where(present: 1, link_type: "I").update_all(link_type: "T")
end
end
@@ -24,11 +24,11 @@ def up
t.text :value
end
- add_index :card_acts, :card_id, name: 'card_id_index'
- add_index :card_acts, :actor_id, name: 'actor_id_index'
- add_index :card_actions, :card_id, name: 'card_id_index'
- add_index :card_actions, :card_act_id, name: 'card_act_id_index'
- add_index :card_changes, :card_action_id, name: 'card_action_id_index'
+ add_index :card_acts, :card_id, name: "card_id_index"
+ add_index :card_acts, :actor_id, name: "actor_id_index"
+ add_index :card_actions, :card_id, name: "card_id_index"
+ add_index :card_actions, :card_act_id, name: "card_act_id_index"
+ add_index :card_changes, :card_action_id, name: "card_action_id_index"
# add_index :card_actions, [:card_id, :draft], name: 'card_id_and_draft_index'
# add_index :card_changes, [:card_action_id, :field], name: 'card_action_id_and_field_index'
end
@@ -1,26 +1,26 @@
class MoveRevisionsToActions < ActiveRecord::Migration
class TmpRevision < ActiveRecord::Base
belongs_to :tmp_card, foreign_key: :card_id
- self.table_name = 'card_revisions'
+ self.table_name = "card_revisions"
def self.delete_cardless
- left_join = 'LEFT JOIN card_revisions '\
- 'ON card_revisions.card_id = cards.id'
- TmpRevision.joins(left_join).where('cards.id IS NULL').delete_all
+ left_join = "LEFT JOIN card_revisions "\
+ "ON card_revisions.card_id = cards.id"
+ TmpRevision.joins(left_join).where("cards.id IS NULL").delete_all
end
end
class TmpAct < ActiveRecord::Base
- self.table_name = 'card_acts'
+ self.table_name = "card_acts"
end
class TmpAction < ActiveRecord::Base
- self.table_name = 'card_actions'
+ self.table_name = "card_actions"
end
class TmpChange < ActiveRecord::Base
- self.table_name = 'card_changes'
+ self.table_name = "card_changes"
end
class TmpCard < ActiveRecord::Base
belongs_to :tmp_revision, foreign_key: :current_revision_id
has_many :tmp_actions, foreign_key: :card_id
- self.table_name = 'cards'
+ self.table_name = "cards"
end
def up
@@ -3,8 +3,8 @@ def self.up
if ActiveRecord::Base.connection.table_exists? :schema_migrations_cards
rename_table :schema_migrations_cards, :schema_migrations_core_cards
else
- create_table 'schema_migrations_core_cards', id: false, force: true do |t|
- t.string 'version', null: false
+ create_table "schema_migrations_core_cards", id: false, force: true do |t|
+ t.string "version", null: false
end
end
end
@@ -1,22 +1,22 @@
class BetterIndexNames < ActiveRecord::Migration
def up
- rename_index :card_acts, 'actor_id_index', 'card_acts_actor_id_index'
- rename_index :card_acts, 'card_id_index', 'card_acts_card_id_index'
+ rename_index :card_acts, "actor_id_index", "card_acts_actor_id_index"
+ rename_index :card_acts, "card_id_index", "card_acts_card_id_index"
- rename_index :card_actions, 'card_act_id_index', 'card_actions_card_act_id_index'
- rename_index :card_actions, 'card_id_index', 'card_actions_card_id_index'
+ rename_index :card_actions, "card_act_id_index", "card_actions_card_act_id_index"
+ rename_index :card_actions, "card_id_index", "card_actions_card_id_index"
- rename_index :card_changes, 'card_action_id_index', 'card_changes_card_action_id_index'
+ rename_index :card_changes, "card_action_id_index", "card_changes_card_action_id_index"
- rename_index :card_references, 'wiki_references_referenced_card_id', 'card_references_referee_id_index'
- rename_index :card_references, 'wiki_references_referenced_name', 'card_references_referee_key_index'
- rename_index :card_references, 'wiki_references_card_id', 'card_references_referer_id_index'
+ rename_index :card_references, "wiki_references_referenced_card_id", "card_references_referee_id_index"
+ rename_index :card_references, "wiki_references_referenced_name", "card_references_referee_key_index"
+ rename_index :card_references, "wiki_references_card_id", "card_references_referer_id_index"
- rename_index :cards, 'cards_key_uniq', 'cards_key_index'
- rename_index :cards, 'card_type_index', 'cards_type_id_index'
- rename_index :cards, 'index_cards_on_trunk_id', 'cards_left_id_index'
- rename_index :cards, 'index_cards_on_tag_id', 'cards_right_id_index'
- rename_index :cards, 'index_cards_on_read_rule_id', 'cards_read_rule_id_index'
+ rename_index :cards, "cards_key_uniq", "cards_key_index"
+ rename_index :cards, "card_type_index", "cards_type_id_index"
+ rename_index :cards, "index_cards_on_trunk_id", "cards_left_id_index"
+ rename_index :cards, "index_cards_on_tag_id", "cards_right_id_index"
+ rename_index :cards, "index_cards_on_read_rule_id", "cards_read_rule_id_index"
end
def down
@@ -1,10 +1,10 @@
# add new indeces for datetime and ref_type fields
class NewIndeces < ActiveRecord::Migration
def change
- add_index 'card_references', ['ref_type'],
- name: 'card_references_ref_type_index' # using: :btree
- add_index 'cards', ['created_at'], name: 'cards_created_at_index'
- add_index 'cards', ['updated_at'], name: 'cards_updated_at_index'
- add_index 'card_acts', ['acted_at'], name: 'acts_acted_at_index'
+ add_index "card_references", ["ref_type"],
+ name: "card_references_ref_type_index" # using: :btree
+ add_index "cards", ["created_at"], name: "cards_created_at_index"
+ add_index "cards", ["updated_at"], name: "cards_updated_at_index"
+ add_index "card_acts", ["acted_at"], name: "acts_acted_at_index"
end
end
@@ -33,8 +33,8 @@ def up
word(['(\w+)lice', '(\w+)louse', '\1lice']),
word(['(\w+)mice', '(\w+)mouse', '\1mice']),
word_end(%w(kine cow kine)),
- word(keep_the_s('analysi')),
- word(keep_the_s('axi'))
+ word(keep_the_s("analysi")),
+ word(keep_the_s("axi"))
]
%w( statu crisi alia bu octopu viru analysi basi diagnosi parenthesi prognosi synopsi thesi ).each do |word|
corrections << word_end(keep_the_s(word))
Oops, something went wrong.

0 comments on commit c854507

Please sign in to comment.