Sha256: f0c34f531885614ca81489f1a107775c3196edf6ade4421c65c93b397dbb8613

Contents?: true

Size: 818 Bytes

Versions: 5

Compression:

Stored size: 818 Bytes

Contents

#!/usr/bin/env ruby
require 'yaml'
require 'i18n'

require_relative '../lib/migrator'

yaml_path = ARGV.shift
fail 'Missing credentials.yml file, `storageroom-to-contentful credentials.yml`' unless yaml_path

spec = Gem::Specification.find_by_name('storageroom-to-contentful')
gem_root = spec.gem_dir

puts gem_root
APP_ROOT = Dir.pwd
DATA_DIR = "#{APP_ROOT}/data"
COLLECTIONS_DATA_DIR = "#{DATA_DIR}/collections"
ENTRIES_DATA_DIR = "#{DATA_DIR}/entries"
STORAGE_ROOM_URL = 'http://api.storageroomapp.com/accounts/'
CONTENTFUL_TYPES = %w(Text Integer Number Boolean Symbol Array Entry Asset Date Location Object)

CREDENTIALS = YAML.load_file(File.expand_path(yaml_path))

translations = "#{gem_root}/contenftul_fields_types.yml"
I18n.load_path << translations
I18n.enforce_available_locales = false

Migrator.new.run

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
storageroom-to-contentful-0.0.5 bin/storageroom-to-contentful
storageroom-to-contentful-0.0.4 bin/storageroom-to-contentful
storageroom-to-contentful-0.0.3 bin/storageroom-to-contentful
storageroom-to-contentful-0.0.2 bin/storageroom-to-contentful
storageroom-to-contentful-0.0.1 bin/storageroom-to-contentful