diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 88273be3..00000000 --- a/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -*.gem -*.sw? -.DS_Store -.bundle/* -.idea -.rvmrc -Gemfile.lock -coverage -junk.* -pkg -rdoc -vendor/bundle -gemfiles/.bundle -gemfiles/vendor -gemfiles/*.lock diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index f7eff493..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,417 +0,0 @@ -# active_hash Changelog - -## Version [4.0.0] - 2025-07-30 - -### Added - -- Add i18n support [#230](https://github.com/active-hash/active_hash/pull/230) @ryu-sato @Yuki-Inoue -- Add `column_names` method [#311](https://github.com/active-hash/active_hash/pull/311) @hatsu38 -- Add block support to `count` [#317](https://github.com/active-hash/active_hash/pull/317) @ashleyHutton -- Support ruby 3.4 [#328](https://github.com/active-hash/active_hash/pull/328) @flavorjones -- Add `:alias` to `has_many :through` [#329](https://github.com/active-hash/active_hash/pull/329) @alexgriff -- Add Active Record 8.0 [#324](https://github.com/active-hash/active_hash/pull/324) @flavorjones - -### Fixed - -- Fix Do not suppress load errors[#309](https://github.com/active-hash/active_hash/pull/309) @andreynering -- Ensure `field_names` are all strings [#312](https://github.com/active-hash/active_hash/pull/312) @flavorjones -- Hide private `add_default_value` [#314](https://github.com/active-hash/active_hash/pull/314) @kbrock -- Fix `exists?(nil)` [#320](https://github.com/active-hash/active_hash/pull/320) @y-yagi -- Enance Enum support [#321](https://github.com/active-hash/active_hash/pull/321) @hatsu38 -- Updated docs [#326](https://github.com/active-hash/active_hash/pull/326) @y-yagi - -### Removed - -- Drop Active Record < 6.1. Ruby < 3.0 [#324](https://github.com/active-hash/active_hash/pull/324) @flavorjones - -## Version [3.3.1] - 2024-05-03 - -### Fixed - -- Fix `hash_many :through` associations which specify a scope. [#306](https://github.com/active-hash/active_hash/pull/306) @sontixyou - - -## Version [3.3.0] - 2024-04-30 - -### Added - -- Ruby 3.3 support [#298](https://github.com/active-hash/active_hash/pull/298) @m-nakamura145 -- Support `has_many :through` associations [#296](https://github.com/active-hash/active_hash/pull/296) @flavorjones -- Rails 7.1 support [#291](https://github.com/active-hash/active_hash/pull/291) @y-yagi - -### Fixed - -- Rails 7.1: fix sqlite3 issue [#303](https://github.com/active-hash/active_hash/pull/303) @flavorjones -- Rails 7.1.3: add missing `has_query_constraints?` [#300](https://github.com/active-hash/active_hash/pull/300) @flavorjones -- `Array#pluck` supports methods [#299](https://github.com/active-hash/active_hash/pull/299) @iberianpig -- Prefer `safe_constantize` over `constantize` [#297](https://github.com/active-hash/active_hash/pull/297) @flavorjones -- Treat `nil` and `blank?` as different values [#295](https://github.com/active-hash/active_hash/pull/295) @kbrock -- Fix `#where` for string keys [#292](https://github.com/active-hash/active_hash/pull/292) @usernam3 - -## Version [3.2.1] - 2023-08-31 - -### Added - -- Improve `pp` output for `ActiveHash::Relation`. [#288](https://github.com/active-hash/active_hash/pull/288) @flavorjones - -### Fixed - -- Fix relation matching when attribute name collides with a method. [#281](https://github.com/active-hash/active_hash/pull/281) @flavorjones -- Fix association reflection in applications that don't use ActiveHash::Associations. [#286](https://github.com/active-hash/active_hash/pull/286) @iberianpig -- Fix `ActiveHash::Relation#method_missing` and `#respond_to_missing?` without scopes. [#278](https://github.com/active-hash/active_hash/pull/278) @julianrubisch - - -## Version [3.2.0] - 2023-05-06 - -- Add Ruby 3.2 to the CI matrix [#275](https://github.com/active-hash/active_hash/pull/275) @petergoldstein -- Handle default value of `false` [#274](https://github.com/active-hash/active_hash/pull/274) @ihollander -- Run CI only one time per commit [#273](https://github.com/active-hash/active_hash/pull/273) @flavorjones -- Rails 7 support [#272](https://github.com/active-hash/active_hash/pull/272) @flavorjones -- Avoid interfere with AR's belongs_to arguments. [#270](https://github.com/active-hash/active_hash/pull/270) @koyo-miyamura -- Fix broken #pluck method with 3+ attrs specified [#269](https://github.com/active-hash/active_hash/pull/269) @h6ah4i -- Fix relations for Rails 7 support, and not modifying conditions [#268](https://github.com/active-hash/active_hash/pull/268) @pfeiffer -- docs: Remove the string 'F' [#264](https://github.com/active-hash/active_hash/pull/264) @tbotaq -- Show example using regex in where query [#263](https://github.com/active-hash/active_hash/pull/263) @scottharvey -- Improve performance of exists? [#262](https://github.com/active-hash/active_hash/pull/262) @ise-tang -- Remove redundant ActiveRecord version check [#260](https://github.com/active-hash/active_hash/pull/260) @yujideveloper -- Fix deprecation warnings [#259](https://github.com/active-hash/active_hash/pull/259) @yujideveloper -- Fix rspec config when SKIP_ACTIVE_RECORD enabled [#258](https://github.com/active-hash/active_hash/pull/258) @yujideveloper -- isolate tests with temporary classes [#256](https://github.com/active-hash/active_hash/pull/256) @machisuke -- Avoid ActiveRecordExtensions affects AR's belongs_to method. [#255](https://github.com/active-hash/active_hash/pull/255) @machisuke -- add option to disable erb parsing [#202](https://github.com/active-hash/active_hash/pull/202) @reedlaw -- add collection singular ids for associations [#237](https://github.com/active-hash/active_hash/pull/237) @1160054 -- Fix the thread-safe spec for the updated cities fixture @adampal -- Add thread-safety to ActiveFile [#229](https://github.com/active-hash/active_hash/pull/229) @dmitriy-kiriyenko - -## Version [3.1.1] - 2022-07-14 - - - Make scopes chainable [#248](https://github.com/active-hash/active_hash/pull/248) @andreynering - - Set default key attributes [#251](https://github.com/active-hash/active_hash/pull/251/commits/68a0a121d110ac83f4bbf0024f027714fd24debf) @adampal - - Migrate from Travis to GitHub Actions for CI @kbrock - - Add primary_key support for has_one [#218](https://github.com/active-hash/active_hash/pull/218) @yujideveloper - - Return a chainable relation when using .not [#205](https://github.com/active-hash/active_hash/pull/205) @pfeiffer - - Correct fields with YAML aliases in array style [#226](https://github.com/active-hash/active_hash/pull/226) @stomk - - Add ActiveHash::Relation#size method for compatibily [#227](https://github.com/active-hash/active_hash/pull/227) @sluceno - - Implement ActiveRecord::RecordNotFound interface [#207](https://github.com/active-hash/active_hash/pull/207) @ChrisBr - - Fix find_by_id with filter chain [#210](https://github.com/active-hash/active_hash/pull/210) @ChrisBr - - Suppress Ruby 2.7 kwargs warnings [#206](https://github.com/active-hash/active_hash/pull/206) @yhirano55 - - Call reload if @records is not defined [#208](https://github.com/active-hash/active_hash/pull/208) @jonmagic - - Switch to rspec3 (and update the Gemfile) [#209](https://github.com/active-hash/active_hash/pull/209) @djberg96 - - Implement filter by RegEx [#211](https://github.com/active-hash/active_hash/pull/211) @ChrisBr - - Supports .pick method [#195](https://github.com/active-hash/active_hash/pull/195/files) @yhirano55 - - Lots of other small performance improvements, documentation and testing. Thanks to everyone who contributed! - -## Version [3.1.0] - 2020-01-15 - - - Add ActiveHash::Base.order method inspired by ActiveRecord [#177](https://github.com/active-hash/active_hash/pull/177) - - Add #to_ary to ActiveHash::Relation [#182](https://github.com/active-hash/active_hash/pull/182) - - Allow #find to behave like Enumerable#find if id is nil and a block is given [#183](https://github.com/active-hash/active_hash/pull/183) - - Delegate :sample to `records` [#189](https://github.com/active-hash/active_hash/pull/189) - -## Version [3.0.0] - 2019-09-28 - - - Make #where chainable [#178](https://github.com/active-hash/active_hash/pull/178) - -## Version [2.3.0] - 2019-09-28 - - - Add ::scope method (inspired by ActiveRecord) [#173](https://github.com/active-hash/active_hash/pull/173) - - Let `.find(nil)` raise ActiveHash::RecordNotFound (inspired by ActiveRecord) [#174](https://github.com/active-hash/active_hash/pull/174) - - `where` clause now works with range argument [#175](https://github.com/active-hash/active_hash/pull/175) - -## Version [2.2.1] - 2019-03-06 - - - Allow empty YAML [#171](https://github.com/active-hash/active_hash/pull/171) Thanks, @ppworks - -## Version [2.2.0] - 2018-11-22 - - - Support pluck method [#164](https://github.com/active-hash/active_hash/pull/164) Thanks, @ihatov08 - - Support where.not method [#167](https://github.com/active-hash/active_hash/pull/167) Thanks, @DialBird - -## Version [2.1.0] - 2018-04-05 - - - Allow to use ERB (embedded ruby) in yml files [#160](https://github.com/active-hash/active_hash/pull/160) Thanks, @UgoMare - - Add `ActiveHash::Base.polymorphic_name` [#162](https://github.com/active-hash/active_hash/pull/162) - - Fix to be able to use enum accessor constant with same name as top-level constant[#161](https://github.com/active-hash/active_hash/pull/161) Thanks, @yujideveloper - -## Version [2.0.0] - 2018-02-27 - - - Drop old Ruby and Rails support [#157](https://github.com/active-hash/active_hash/pull/157) - - Don't generate instance accessors for class attributes [#136](https://github.com/active-hash/active_hash/pull/136) Thanks, @rainhead - -## Version [1.5.3] - 2017-06-14 - - - Support symbol values in where and find_by [#156](https://github.com/active-hash/active_hash/pull/156) Thanks, @south37 - -## Version [1.5.2] - 2017-06-14 - - - Fix find_by when passed an invalid id [#152](https://github.com/active-hash/active_hash/pull/152) Thanks, @davidstosik - -## Version [1.5.1] - 2017-04-20 - - - Fix a bug on `.where` [#147](https://github.com/active-hash/active_hash/pull/147) - -## Version [1.5.0] - 2017-03-24 - - - add support for `.find_by!`(@syguer) - -## Version [1.4.1] - 2015-09-13 - - - fix bug where `#attributes` didn't contain default values [#107](https://github.com/active-hash/active_hash/pull/107) - - add support for `.find_by` and `#_read_attribute`. Thanks, @andrewfader - -## Version [1.4.0] - 2014-09-03 - - - support Rails 4.2 @agraves, @al2o3cr - -## Version [1.3.0] - 2014-02-18 - - - fix bug where including ActiveHash associations would make `belongs_to :imageable, polymorphic: true` blow up - - fixed several bugs that prevented active hash from being used without active record / active model - - add support for splitting up data sources into multiple files @rheaton - - add support for storing data in json files @rheaton - -## Version [1.2.3] - 2013-11-29 - - - fix bug where active hash would call `.all` on models when setting has_many @grosser - -## Version [1.2.2] - 2013-11-05 - - - fix bug in gemspec that made it impossible to use w/ Rails 4 - -## Version [1.2.1] - 2013-10-24 - - - fixed nasty bug in belongs_to that would prevent users from passing procs @freebird0221 - - fixed bug where passing in a separate class name to belongs_to_active_hash would raise an exception @mauriciopasquier - -## Version [1.2.0] - 2013-10-01 - - - belongs_to is back! - - added support for primary key options for belongs_to @tomtaylor - -## Version [1.0.2] - 2013-09-09 - - - `where(nil)` returns all results, like ActiveRecord @kugaevsky - -## Version [1.0.1] - 2013-07-15 - - - Travis CI for ActiveHash + Ruby 2, 1.8.7, Rubinius and JRuby support @mattheworiordan - - no longer need to call .all before executing `find_by_*` or `where` methods @mattheworiordan - -## Version [1.0.0] - 2013-06-24 - - - save is a no-op on existing records, instead of raising an error (issue #63) - -## Version [0.10.0] - 2013-06-24 - - - added ActiveYaml::Aliases module so you can DRY up your repetitive yaml @brett-richardson - -## Version [0.9.14] - 2013-05-23 - - - enum_accessor can now take multiple field names when generating the constant - - temporarily disabled rails edge specs since there's an appraisal issue with minitest - -## Version [0.9.13] 2013-01-22 - - Fix find_by_id and find method returning nil unless .all called in ActiveYaml @mattheworiordan - -## Version [0.9.12] 2012-07-25 - - Make find_by_id lookups faster by indexing records by id @desmondmonster - -## Version [0.9.11] 2012-07-16 - - Validate IDs are unique by caching them in a set @desmondmonster - -## Version [0.9.10] 2012-04-14 - - Support for has_one associations @kbrock - -## Version [0.9.9] 2012-04-05 - - - Allow gems like simple_form to read metadata about belongs_to associations that point to active hash objects @kbrock - - Move specs to appraisal @flavorjones - -## Version [0.9.8] - 2012-01-18 - - - Make ActiveHash.find with array raise an exception when record cannot be found @mocoso - -## Version [0.9.7] - 2011-09-18 - - - Fixing the setting of a `belongs_to_active_hash` association by association (not id). - -## Version [0.9.6] - 2011-08-31 - - added a module which adds a .belongs_to_active_hash method to ActiveRecord, since it was broken for Rails 3.1 @felixclack - -## Version [0.9.5] - 2011-06-07 - - fixed bug where .find would not work if you defined your ids as strings - -## Version [0.9.4] - 2011-06-05 - - fixed deprecation warnings for class_inheritable_accessor @scudco - - added basic compatibility with the `where` method from Arel @rgarver - -## Version [0.9.3] - 2011-04-19 - - better dependency management and compatibility with ActiveSupport 2.x @vandrijevik - -## Version [0.9.2] - 2011-01-22 - - improved method_missing errors for dynamic finders - - prevent users from trying to overwrite :attributes [#33](https://github.com/active-hash/active_hash/issues/33) - -## Version [0.9.1] 2010-12-08 - - ruby 1.9.2 compatibility - -## Version [0.9.0] 2010-12-06 - - added dependency on ActiveModel - - add persisted? method to ActiveHash::Base - - ActiveHash::Base#save takes \*args to be compatible with ActiveModel - - ActiveHash::Base#to_param returns nil if the object hasn't been saved - -## Version [0.8.7] 2010-11-09 - - Use Ruby's definition of "word character" (numbers, underscores) when forming ActiveHash::Enum constants @tstuart - -## Version [0.8.6] 2010-11-07 - - Get ActiveHash::Associations to return a scope for has_many active record relationships @mocoso - -## Version [0.8.5] 2010-10-20 - - Allow find_by_* methods to accept an options hash, so rails associations don't blow up - -## Version [0.8.4] 2010-10-07 - - Add conditions to ActiveHash#all (Ryan Garver) - - Add #cache_key to ActiveHash::Base (Tom Stuart) - - Add banged dynamic finder support to ActiveHash::Base (Tom Stuart) - -## Version [0.8.3] 2010-09-16 - - Enum format now uses underscores instead of removing all characters - - Removed test dependency on acts_as_fu - -## Version [0.8.2] 2010-05-26 - - Silence metaclass deprecation warnings in active support 2.3.8 - -## Version [0.8.1] 2010-05-04 - - When calling ActiveFile::Base.reload do not actually perform the reload if nothing has been modified unless you call reload(true) to force (Michael Schubert) - -## Version [0.8.0] 2010-04-25 - - When ActiveRecord model belongs_to an ActiveHash and the associated id is nil, returns nil instead of raising RecordNotFound (Jeremy Weiskotten) - - Merged Nakajima's "add" alias for "create" - gotta save those ASCII characters :) - -## Version [0.7.9] 2010-03-01 - - Removed "extend"-related deprecations - they didn't play well with rails class loading - -## Version [0.7.8] 2010-01-18 - - Added stub for #destroyed? method, since Rails associations now depend on it - -## Version [0.7.7] 2009-12-19 - - Deprecated include ActiveHash::Associations in favor of extend ActiveHash::Associations - -## Version [0.7.6] 2009-12-19 - - Added ActiveHash::Enum (John Pignata) - - Fixed bug where you can't set nil to an association - - Calling #belongs_to now creates the underlying field if it's not already there (belongs_to :city will create the :city_id field) - -## Version [0.7.5] 2009-12-10 - - Fixed a bug where belongs_to associations would raise an error instead of returning nil when the parent object didn't exist. - - Added #[] and #[]= accessors for more ActiveRecord-esque-ness. (Pat Nakajima & Dave Yeu) - -## Version [0.7.4] 2009-12-01 - - Add marked_for_destruction? to be compatible with nested attributes (Brandon Keene) - - Added second parameter to respond_to? and cleaned up specs (Brian Takita) - - Find with an id that does not exist now raises a RecordNotFound exception to mimic ActiveRecord (Pat Nakajima) - -## Version [0.7.3] 2009-10-22 - - added setters to ActiveHash::Base for all fields - - instantiating an ActiveHash object with a hash calls the setter methods on the object - - boolean default values now work - -## Version [0.7.2] 2009-10-21 - - Removed auto-reloading of files based on mtime - maybe it will come back later - - Made ActiveFile::Base.all a bit more sane - -## Version 0.7.1 2009-10-13 - - added ActiveHash::Base.has_many, which works with ActiveRecord or ActiveHash classes @baldwindavid - - added ActiveHash::Base.belongs_to, which works with ActiveRecord or ActiveHash classes @baldwindavid - - added .delete_all method that clears the in-memory array - - added support for Hash-style yaml (think, Rails fixtures) - - added setter for parent object on belongs_to ( `city = City.new; city.state = State.first; city.state_id == State.first.id` ) - -## Version [0.7.0] 2009-10-12 - - auto-assign fields after calling data= instead of after calling .all - - remove require 'rubygems', so folks with non-gem setups can still use AH - - added more specific activesupport dependency to ensure that metaclass is available - - AH no longer calls to_i on ids. If you pass in a string as an id, you'll get a string back - - Fancy finders, such as find_all_by_id_and_name, will compare the to_s values of the fields, so you can pass in strings - - You can now use ActiveHash models as the parents of polymorphic belongs_to associations - - save, save!, create and create! now add items to the in-memory collection, and naively adds autoincrementing id - - new_record? returns false if the record is part of the collection - - ActiveHash now works with Fixjour! - -## Version [0.6.1] 2009-08-19 - - Added custom finders for multiple fields, such as .find_all_by_name_and_age - -## Version 0.5.0 2009-07-23 - - Added support for auto-defining methods based on hash keys in ActiveHash::Base - - Changed the :field and :fields API so that they don't overwrite existing methods (useful when ActiveHash auto-defines methods) - - Fixed a bug where ActiveFile incorrectly set the root_path to be the path in the gem directory, not the current working directory - -## Version 0.4.0 2009-07-24 - - ActiveFile no longer reloads files by default - - Added ActiveFile.reload_active_file= so you can cause ActiveFile to reload - - Setting data to nil correctly causes .all to return an empty array - - Added reload(force) method, so that you can force a reload from files in ActiveFile, useful for tests - -[HEAD]: https://github.com/active-hash/active_hash/compare/v3.4.0...HEAD -[3.3.2]: https://github.com/active-hash/active_hash/compare/v3.3.1...v3.4.0 -[3.3.1]: https://github.com/active-hash/active_hash/compare/v3.3.0...v3.3.1 -[3.3.0]: https://github.com/active-hash/active_hash/compare/v3.2.1...v3.3.0 -[3.2.1]: https://github.com/active-hash/active_hash/compare/v3.2.0...v3.2.1 -[3.2.0]: https://github.com/active-hash/active_hash/compare/v3.1.1...v3.2.0 -[3.1.1]: https://github.com/active-hash/active_hash/compare/v3.1.0...v3.1.1 -[3.1.0]: https://github.com/active-hash/active_hash/compare/v3.0.0...v3.1.0 -[3.0.0]: https://github.com/active-hash/active_hash/compare/v2.3.0...v3.0.0 -[2.3.0]: https://github.com/active-hash/active_hash/compare/v2.2.1...v2.3.0 -[2.2.1]: https://github.com/active-hash/active_hash/compare/v2.2.0...v2.2.1 -[2.2.0]: https://github.com/active-hash/active_hash/compare/v2.1.0...v2.2.0 -[2.1.0]: https://github.com/active-hash/active_hash/compare/v2.0.0...v2.1.0 -[2.0.0]: https://github.com/active-hash/active_hash/compare/v1.5.3...v2.0.0 -[1.5.3]: https://github.com/active-hash/active_hash/compare/v1.5.2...v1.5.3 -[1.5.2]: https://github.com/active-hash/active_hash/compare/v1.5.1...v1.5.2 -[1.5.1]: https://github.com/active-hash/active_hash/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/active-hash/active_hash/compare/v1.4.1...v1.5.0 -[1.4.1]: https://github.com/active-hash/active_hash/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/active-hash/active_hash/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/active-hash/active_hash/compare/v1.2.3...v1.3.0 -[1.2.3]: https://github.com/active-hash/active_hash/compare/v1.2.2...v1.2.3 -[1.2.2]: https://github.com/active-hash/active_hash/compare/v1.2.1...v1.2.2 -[1.2.1]: https://github.com/active-hash/active_hash/compare/v1.2.0...v1.2.1 -[1.2.0]: https://github.com/active-hash/active_hash/compare/v1.0.2...v1.2.0 -[1.0.2]: https://github.com/active-hash/active_hash/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/active-hash/active_hash/compare/v1.0.0...v1.0.1 -[1.0.0]: https://github.com/active-hash/active_hash/compare/v0.10.0...v1.0.0 -[0.10.0]: https://github.com/active-hash/active_hash/compare/v0.9.14...v0.10.0 -[0.9.14]: https://github.com/active-hash/active_hash/compare/v0.9.13...v0.9.14 -[0.9.13]: https://github.com/active-hash/active_hash/compare/v0.9.12...v0.9.13 -[0.9.12]: https://github.com/active-hash/active_hash/compare/v0.9.11...v0.9.12 -[0.9.11]: https://github.com/active-hash/active_hash/compare/v0.9.10...v0.9.11 -[0.9.10]: https://github.com/active-hash/active_hash/compare/v0.9.9...v0.9.10 -[0.9.9]: https://github.com/active-hash/active_hash/compare/v0.9.8...v0.9.9 -[0.9.8]: https://github.com/active-hash/active_hash/compare/v0.9.7...v0.9.8 -[0.9.7]: https://github.com/active-hash/active_hash/compare/v0.9.6...v0.9.7 -[0.9.6]: https://github.com/active-hash/active_hash/compare/v0.9.5...v0.9.6 -[0.9.5]: https://github.com/active-hash/active_hash/compare/v0.9.4...v0.9.5 -[0.9.4]: https://github.com/active-hash/active_hash/compare/v0.9.3...v0.9.4 -[0.9.3]: https://github.com/active-hash/active_hash/compare/v0.9.2...v0.9.3 -[0.9.2]: https://github.com/active-hash/active_hash/compare/v0.9.1...v0.9.2 -[0.9.1]: https://github.com/active-hash/active_hash/compare/v0.9.0...v0.9.1 -[0.9.0]: https://github.com/active-hash/active_hash/compare/v0.8.7...v0.9.0 -[0.8.7]: https://github.com/active-hash/active_hash/compare/v0.8.6...v0.8.7 -[0.8.6]: https://github.com/active-hash/active_hash/compare/v0.8.5...v0.8.6 -[0.8.5]: https://github.com/active-hash/active_hash/compare/v0.8.4...v0.8.5 -[0.8.4]: https://github.com/active-hash/active_hash/compare/v0.8.3...v0.8.4 -[0.8.3]: https://github.com/active-hash/active_hash/compare/v0.8.2...v0.8.3 -[0.8.2]: https://github.com/active-hash/active_hash/compare/v0.8.1...v0.8.2 -[0.8.1]: https://github.com/active-hash/active_hash/compare/v0.8.0...v0.8.1 -[0.8.0]: https://github.com/active-hash/active_hash/compare/v0.7.9...v0.8.0 -[0.7.9]: https://github.com/active-hash/active_hash/compare/v0.7.8...v0.7.9 -[0.7.8]: https://github.com/active-hash/active_hash/compare/v0.7.7...v0.7.8 -[0.7.7]: https://github.com/active-hash/active_hash/compare/v0.7.6...v0.7.7 -[0.7.6]: https://github.com/active-hash/active_hash/compare/v0.7.5...v0.7.6 -[0.7.5]: https://github.com/active-hash/active_hash/compare/v0.7.4...v0.7.5 -[0.7.4]: https://github.com/active-hash/active_hash/compare/v0.7.3...v0.7.4 -[0.7.3]: https://github.com/active-hash/active_hash/compare/v0.7.2...v0.7.3 -[0.7.2]: https://github.com/active-hash/active_hash/compare/v0.7.0...v0.7.2 -[0.7.0]: https://github.com/active-hash/active_hash/compare/v0.6.1...v0.7.0 -[0.6.1]: https://github.com/active-hash/active_hash/compare/v0.6.0...v0.6.1 diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 86d84b3c..00000000 --- a/Gemfile +++ /dev/null @@ -1,18 +0,0 @@ -source "http://rubygems.org/" - -gemspec - -gem 'rspec', '~> 3.9' -gem 'rake' -gem 'test-unit' -gem 'json' - -platforms :jruby do - gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.6' -end - -platforms :ruby do - gem 'sqlite3', '~> 1.4', '< 2.0' # can allow 2.0 once Rails's sqlite adapter allows it -end - -gem 'activerecord', '>= 6.1.0' diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e4ee32a2..00000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009 Jeff Dean - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 2697bc46..00000000 --- a/Rakefile +++ /dev/null @@ -1,9 +0,0 @@ -require 'bundler/setup' -require 'bundler/gem_tasks' - -require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new(:spec) do |spec| - spec.pattern = 'spec/**/*_spec.rb' -end - -task :default => :spec diff --git a/active_hash.gemspec b/active_hash.gemspec deleted file mode 100644 index 5c7d3008..00000000 --- a/active_hash.gemspec +++ /dev/null @@ -1,57 +0,0 @@ -# -*- encoding: utf-8 -*- - -$:.push File.expand_path("../lib", __FILE__) -require "active_hash/version" - -Gem::Specification.new do |s| - s.name = "active_hash" - s.version = ActiveHash::Gem::VERSION - s.authors = [ - "Jeff Dean", - "Mike Dalessio", - "Corey Innis", - "Peter Jaros", - "Brandon Keene", - "Brian Takita", - "Pat Nakajima", - "John Pignata", - "Michael Schubert", - "Jeremy Weiskotten", - "Ryan Garver", - "Tom Stuart", - "Joel Chippindale", - "Kevin Olsen", - "Vladimir Andrijevik", - "Adam Anderson", - "Keenan Brock", - "Desmond Bowe", - "Matthew O'Riordan", - "Brett Richardson", - "Rachel Heaton", - "Keisuke Izumiya" - ] - s.email = %q{jeff@zilkey.com} - s.summary = %q{An ActiveRecord-like model that uses a hash or file as a datasource} - s.description = %q{Includes the ability to specify data using hashes, yml files or JSON files} - s.homepage = %q{http://github.com/active-hash/active_hash} - s.license = "MIT" - - s.metadata = { - "homepage_uri" => s.homepage, - "changelog_uri" => "https://github.com/active-hash/active_hash/blob/master/CHANGELOG.md", - "source_code_uri" => s.homepage, - "bug_tracker_uri" => "https://github.com/active-hash/active_hash/issues", - } - - s.files = [ - "CHANGELOG.md", - "LICENSE", - "README.md", - "active_hash.gemspec", - Dir.glob("lib/**/*") - ].flatten - s.test_files = s.files.grep(%r{^(test|spec|features)/}) - s.add_runtime_dependency('activesupport', '>= 6.1.0') - s.add_development_dependency "pry" - s.required_ruby_version = '>= 3.0.0' -end diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 00000000..0ed28879 --- /dev/null +++ b/app/globals.css @@ -0,0 +1,92 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer utilities { + .text-balance { + text-wrap: balance; + } +} + +@layer base { + :root { + --font-sans: var(--font-geist-sans); + --font-mono: var(--font-geist-mono); + --background: 0 0% 100%; + --foreground: 0 0% 3.9%; + --card: 0 0% 100%; + --card-foreground: 0 0% 3.9%; + --popover: 0 0% 100%; + --popover-foreground: 0 0% 3.9%; + --primary: 0 0% 9%; + --primary-foreground: 0 0% 98%; + --secondary: 0 0% 96.1%; + --secondary-foreground: 0 0% 9%; + --muted: 0 0% 96.1%; + --muted-foreground: 0 0% 45.1%; + --accent: 0 0% 96.1%; + --accent-foreground: 0 0% 9%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + --border: 0 0% 89.8%; + --input: 0 0% 89.8%; + --ring: 0 0% 3.9%; + --chart-1: 12 76% 61%; + --chart-2: 173 58% 39%; + --chart-3: 197 37% 24%; + --chart-4: 43 74% 66%; + --chart-5: 27 87% 67%; + --radius: 0.5rem; + --sidebar-background: 0 0% 98%; + --sidebar-foreground: 240 5.3% 26.1%; + --sidebar-primary: 240 5.9% 10%; + --sidebar-primary-foreground: 0 0% 98%; + --sidebar-accent: 240 4.8% 95.9%; + --sidebar-accent-foreground: 240 5.9% 10%; + --sidebar-border: 220 13% 91%; + --sidebar-ring: 217.2 91.2% 59.8%; + } + .dark { + --background: 0 0% 3.9%; + --foreground: 0 0% 98%; + --card: 0 0% 3.9%; + --card-foreground: 0 0% 98%; + --popover: 0 0% 3.9%; + --popover-foreground: 0 0% 98%; + --primary: 0 0% 98%; + --primary-foreground: 0 0% 9%; + --secondary: 0 0% 14.9%; + --secondary-foreground: 0 0% 98%; + --muted: 0 0% 14.9%; + --muted-foreground: 0 0% 63.9%; + --accent: 0 0% 14.9%; + --accent-foreground: 0 0% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + --border: 0 0% 14.9%; + --input: 0 0% 14.9%; + --ring: 0 0% 83.1%; + --chart-1: 220 70% 50%; + --chart-2: 160 60% 45%; + --chart-3: 30 80% 55%; + --chart-4: 280 65% 60%; + --chart-5: 340 75% 55%; + --sidebar-background: 240 5.9% 10%; + --sidebar-foreground: 240 4.8% 95.9%; + --sidebar-primary: 224.3 76.3% 48%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 240 3.7% 15.9%; + --sidebar-accent-foreground: 240 4.8% 95.9%; + --sidebar-border: 240 3.7% 15.9%; + --sidebar-ring: 217.2 91.2% 59.8%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 00000000..4489638d --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,45 @@ +import type { Metadata } from 'next' +import { Geist, Geist_Mono } from 'next/font/google' +import { Analytics } from '@vercel/analytics/next' +import './globals.css' + +const _geist = Geist({ subsets: ["latin"] }); +const _geistMono = Geist_Mono({ subsets: ["latin"] }); + +export const metadata: Metadata = { + title: 'v0 App', + description: 'Created with v0', + generator: 'v0.app', + icons: { + icon: [ + { + url: '/icon-light-32x32.png', + media: '(prefers-color-scheme: light)', + }, + { + url: '/icon-dark-32x32.png', + media: '(prefers-color-scheme: dark)', + }, + { + url: '/icon.svg', + type: 'image/svg+xml', + }, + ], + apple: '/apple-icon.png', + }, +} + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode +}>) { + return ( + + + {children} + + + + ) +} diff --git a/app/page.tsx b/app/page.tsx new file mode 100644 index 00000000..2a0ecd97 --- /dev/null +++ b/app/page.tsx @@ -0,0 +1,173 @@ +import Link from "next/link" +import { Button } from "@/components/ui/button" +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" +import { Instagram, Linkedin, Menu, Plus, Twitter, Youtube } from "lucide-react" +import SocialMediaCard from "@/components/social-media-card" +import ContentCreator from "@/components/content-creator" +import StudioSelector from "@/components/studio-selector" +import MobileNavigation from "@/components/mobile-navigation" +import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet" + +export default function Dashboard() { + return ( +
+ {/* Glassmorphic container */} +
+ {/* Header */} +
+
+

POSTCRAFT

+ + {/* Mobile menu */} +
+ + + + + + + + +
+ + {/* Desktop buttons */} +
+ + +
+
+
+ +
+ {/* Sidebar - Desktop only */} +
+ + +
+

PLATFORMS

+
+ + + + +
+
+
+ + {/* Main content */} +
+
+

CONNECTED ACCOUNTS

+
+ } + color="bg-gradient-to-br from-purple-500 to-pink-500" + /> + } + color="bg-blue-400" + /> + } + color="bg-blue-600" + /> + +
+
+ +
+

CREATE CONTENT

+ + + + Post + + + Story + + + Video + + + + + + + + + + + + +
+ +
+

CONTENT STUDIO

+ +
+
+
+
+
+ ) +} diff --git a/app/studio/audio/page.tsx b/app/studio/audio/page.tsx new file mode 100644 index 00000000..147c2731 --- /dev/null +++ b/app/studio/audio/page.tsx @@ -0,0 +1,362 @@ +"use client" + +import type React from "react" + +import { useState, useRef, useEffect } from "react" +import { Card } from "@/components/ui/card" +import { Button } from "@/components/ui/button" +import { Slider } from "@/components/ui/slider" +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" +import { Switch } from "@/components/ui/switch" +import { Label } from "@/components/ui/label" +import { Textarea } from "@/components/ui/textarea" +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" +import { + Play, + Pause, + SkipBack, + SkipForward, + Upload, + Save, + Download, + Mic, + Music, + Volume2, + VolumeX, + Wand2, + Sparkles, + MessageSquare, + Loader2, +} from "lucide-react" + +export default function AudioStudioPage() { + const [isPlaying, setIsPlaying] = useState(false) + const [volume, setVolume] = useState(75) + const [audioFile, setAudioFile] = useState(null) + const [isProcessing, setIsProcessing] = useState(false) + const [aiPrompt, setAiPrompt] = useState("") + const [aiResponse, setAiResponse] = useState("") + const canvasRef = useRef(null) + + // Simulate waveform visualization + useEffect(() => { + const canvas = canvasRef.current + if (!canvas) return + + const ctx = canvas.getContext("2d") + if (!ctx) return + + const width = canvas.width + const height = canvas.height + + ctx.clearRect(0, 0, width, height) + ctx.fillStyle = "#000" + + // Draw a simulated waveform + const barWidth = 3 + const gap = 2 + const bars = Math.floor(width / (barWidth + gap)) + + for (let i = 0; i < bars; i++) { + // Generate random heights for the waveform visualization + const barHeight = Math.random() * (height * 0.8) + height * 0.1 + ctx.fillRect(i * (barWidth + gap), (height - barHeight) / 2, barWidth, barHeight) + } + }, []) + + const handleFileChange = (e: React.ChangeEvent) => { + if (e.target.files && e.target.files[0]) { + setAudioFile(e.target.files[0]) + } + } + + const handleAIProcess = () => { + if (!aiPrompt.trim()) return + + setIsProcessing(true) + + // Simulate AI processing + setTimeout(() => { + setAiResponse( + "I've analyzed your audio and made the following adjustments: enhanced bass frequencies, reduced background noise, and improved vocal clarity. The processed audio has a more balanced EQ profile and sounds more professional.", + ) + setIsProcessing(false) + }, 2000) + } + + return ( +
+

AUDIO STUDIO

+ +
+
+ {/* Audio upload section */} + +

Audio Source

+
+ {audioFile ? ( +
+ +

{audioFile.name}

+

{(audioFile.size / (1024 * 1024)).toFixed(2)} MB

+
+ ) : ( + <> + +

Drop your audio file here or

+ + + + )} +
+ +
+ + + + +
+
+ + {/* Waveform visualization */} + +

Audio Editor

+
+
+ +
+ + {/* Playback controls */} +
+ + + +
+
+ +
+
+ +
+ {volume === 0 ? : } + setVolume(value[0])} + /> + {volume}% +
+
+ +
+ +
+ + 100% +
+
+
+
+ + {/* AI Audio Processing */} + +
+ +

AI Audio Assistant

+
+ +
+
+ +