Skip to content

Commit

Permalink
Gemfile is cleaned up and drop ruby support below 2.5 version
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfonsoUceda committed Nov 12, 2024
1 parent a67a273 commit 65a0b07
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
7 changes: 0 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
source "https://rubygems.org"

gem "minitest", "~> 5.2"
gem "cells-erb"#, path: "../cells-erb"
gem "benchmark-ips"
gem "minitest-line"

gemspec

# gem "uber", path: "../uber"
51 changes: 29 additions & 22 deletions cells.gemspec
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
lib = File.expand_path("../lib/", __FILE__)
$:.unshift lib unless $:.include?(lib)

require "cell/version"
require_relative 'lib/cell/version'

Gem::Specification.new do |spec|
spec.name = "cells"
spec.name = 'cells'
spec.version = Cell::VERSION
spec.platform = Gem::Platform::RUBY
spec.authors = ["Nick Sutterer"]
spec.email = ["[email protected]"]
spec.homepage = "https://github.com/apotonick/cells"
spec.summary = %q{View Models for Ruby and Rails.}
spec.description = %q{View Models for Ruby and Rails, replacing helpers and partials while giving you a clean view architecture with proper encapsulation.}
spec.license = "MIT"
spec.authors = ['Nick Sutterer']
spec.email = ['[email protected]']
spec.homepage = 'https://github.com/trailblazer/cells'
spec.summary = 'View Models for Ruby and Rails.'
spec.description = 'View Models for Ruby and Rails, replacing helpers and partials while giving you a clean view architecture with proper encapsulation.'
spec.license = 'MIT'

spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/HEAD/CHANGES.md"
spec.metadata['documentation_uri'] = 'https://trailblazer.to/2.1/docs/cells'
spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = spec.homepage
spec.metadata['wiki_uri'] = "#{spec.homepage}/wiki"

spec.files = `git ls-files`.split("\n")
spec.test_files = `git ls-files -- {test}/*`.split("\n")
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |file|
file.start_with?(*%w[.git Gemfile Rakefile TODO test])
end
end
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.5'

spec.add_dependency "uber", "< 0.2.0"
spec.add_dependency 'declarative-builder', '~> 0.2.0'
spec.add_dependency 'tilt', '>= 1.4', '< 3'
spec.add_dependency "declarative-option", "< 0.2.0"
spec.add_dependency "declarative-builder", "< 0.2.0"
spec.add_dependency "tilt", ">= 1.4", "< 3"
spec.add_dependency 'uber', '< 0.2.0'

spec.add_development_dependency "rake"
spec.add_development_dependency "capybara"
spec.add_development_dependency "cells-erb", ">= 0.0.4"
spec.add_development_dependency 'capybara'
spec.add_development_dependency 'cells-erb', '>= 0.1.0'
spec.add_development_dependency 'minitest'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'debug'
end
3 changes: 1 addition & 2 deletions lib/cell/view_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ def process_options!(options)

# Computes the view name from the call stack in which `render` was invoked.
def state_for_implicit_render(options)
_caller = RUBY_VERSION < "2.0" ? caller(3) : caller(3, 1) # TODO: remove case in 5.0 when dropping 1.9.
_caller[0].match(/`(\w+)|#(\w+)'/).captures.compact.first
caller(3, 1)[0].match(/`(\w+)|#(\w+)'/).captures.compact.first
end

include Layout
Expand Down

0 comments on commit 65a0b07

Please sign in to comment.